mysql error please help

Started on the old forum in August 2013 · view the original in the archive · old links redirect here

#max #mysql #problem

5 replies · 760 views · started 13 years ago · 1 min read

3 participants
Lue_chin Developer · 107 posts #1

hello coders i need some help today in morning when i open my site its shows a error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/nicejatt/public_html/morve.php on line 22 User 'nicejatt_kamal' has exceeded the 'max_questions' resource (current value: 1)

http://www.nicejatt.net/morve.php

please help me how i solve this i use host-gator hosting

Lue_chin Developer · 107 posts #3

$sql=mysql_query("SELECT * FROM table name WHERE id='$z'");

but this is some different problem -- there is no problem in coding because i use this script till 2 month now its error is has exceeded the 'max_connections_per_hour' resource (current value: 1)

something else Fellow · 2,296 posts #4

try:

$sql=mysql_query("SELECT * FROM table name WHERE id='".$z."'"); 

if that doesnt work try mysql_pconnect instead of your mysql_connect (remember to remove any mysql_close when using a persistent connection

note: both mysql_connect and mysql_pconnect have been deprecated as of PHP 5.5.0 so would recommend updating to mysqli at some point: PHP: Mysqli - Manual

Lue_chin Developer · 107 posts #5

its diffrent error

BROTHER SOMETHING ELSE THANKS BUT HERE IS SOME ANOYTHER PROBLEM my hosting provider sent me a mail

This message is to advise you of a temporary block placed on your database. The database associated with the script in "nicejatt_mp3" was found to be consuming an inordinate amount of processor time, to the point of degrading overall system performance. While we do limit each account to no more than 25% of a system's CPU in our terms of service, we do not actively disable accounts until they greatly exceed that number, which is what happened in this case.

Resolving this situation may be as simple as adding additional indexes to your database, optimizing the queries used, or something equally easy. If not, it may simply be a matter of moving this database to dedicated services, as it may have outgrown a shared environment.

If you believe you have a solution to this overuse, we are happy to discuss the situation with you and possibly reinstate the database on the server. Otherwise, we will be happy to assist you with the upgrade process if a dedicated server is the most appropriate solution. Thank you, and we look forward to hearing from you shortly.

~ Excessive MySQL activity is caused by (a) a long-running process that locks a table, causing other queries to back up, (b) a query that is not optimized ][example: select all from ... and involving a large or complex query], (c) huge table copies/maintenance during peak hours.

NOTE:, the following are just possible fixes or suggestions, and are not endorsed or supported by HostGator. They are included in the hope that they may apply to your situation, and/or help you reduce the amount of resources your SQL queries consume. As always, it's best to backup any data before making any changes or adjustments.

First and foremost, you may need to optimize your tables. The frequency depends on the size and usage of the database, but most databases would benefit from doing something like this on a yearly basis: a) Enter your phpMyAdmin/MySQL control panel. Click on the database (not the table, the database name), and on the right hand column your tables should be listed. Scroll down till you see the .Check all. link. Click on that link, make sure all database tables are checked and then from the drop-down next to it, and carefully select .Optimize table..

Additionally, adding indexes to your table(s) may improve performance. If you're not sure what you're doing, it's best not to modify any table; caution is recommended. There are various articles (Four Ways to Optimize Your MySQL Database - Developer.com). It may be best to Google for something like [Your Software Name] MySQL indexes for suggestions.

If you reply back to this with your IP address (Web Hosting Services, Reseller Hosting, VPS Hosting, and Dedicated Servers by HostGator) we will be more than happy to go ahead enable HTTP access for you, so that you can safely work on the script without it causing further issues. Please let us know how you would like to proceed.

+------------------+----------+-------------------+-----------+----------------+------------+-----------------+--------------------+------------------+ | USER | CPU_TIME | TOTAL_CONNECTIONS | BUSY_TIME | BYTES_RECEIVED | BYTES_SENT | SELECT_COMMANDS | DENIED_CONNECTIONS | LOST_CONNECTIONS | +------------------+----------+-------------------+-----------+----------------+------------+-----------------+--------------------+------------------+ | nicejatt_kamal | 82 | 141 | 84 | 59423 | 3402494 | 341 | 0 | 0 | +++ | 24234785 | nicejatt_kamal | localhost | nicejatt_mp3 | Query | 0 | Sending data | SELECT * FROM mzc WHERE song LIKE '%Malladi Brothers Live Recording%' OR album LIKE '%Malladi Brothers Live Recording%' OR artist LIKE '%Malladi Brothers Live Recording%' ORDER BY id LIMIT 1,10 | 0 | 0 | 155830 | | 24234801 | nicejatt_kamal | localhost | nicejatt_mp3 | Query | 0 | Sending data | SELECT * FROM mzc WHERE song LIKE '%Zara%' | 285 | 0 | 110402 | | 24234815 | nicejatt_kamal | localhost | nicejatt_mp3 | Query | 0 | Sending data | SELECT * FROM mzc WHERE song LIKE '%Malkit Singh In Sad Mood%' OR album LIKE '%Malkit Singh In Sad Mood%' OR artist LIKE '%Malkit Singh In Sad Mood%' ORDER BY id LIMIT 1,10 | 1 | 0 | 153801 | | 24234853 | nicejatt_kamal | localhost | nicejatt_mp3 | Query | 0 | Sending data | SELECT * FROM mzc WHERE song LIKE '%Malkit Singh Chot Nagare Lavo%' OR album LIKE '%Malkit Singh Chot Nagare Lavo%' OR artist LIKE '%Malkit Singh Chot Nagare Lavo%' ORDER BY id LIMIT 1,10 | 0 | 0 | 52408

something else Fellow · 2,296 posts #6

do as the email tells you and check to see if your tables are indexed correctly and instead of using SELECT * FROM mzc only select the columns you need eg: SELECT song, album FROM mzc Also login to database and optimize your tables 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close