Author Topic: My site is down, help please!  (Read 7944 times)

0 Members and 1 Guest are viewing this topic.

Offline artmedia

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Fotos de chicas
My site is down, help please!
« on: April 09, 2009, 09:20:32 AM »
Hi, my site www.ticas.cr is down, i have received this email from hosting company, but I have moved to this one bcz the previous hosting was down too, now i don't know what to fix, seem it is a problem on my side, any help?

This the email from the hosting:

System administration has been tracking higher resource usage on the machine housing your account, and has traced some of these issues to longer running mysql queries related to your account.

Unfortunately, at this time it is not clear exactly what on your site is causing these issues, but we do need you to see if you can reduce the burden these queries cause on the server.

In the shared system, most queries should complete through the server in less than a second.  Some of the queries related to your account take a good deal longer than this to complete, and seem to be the source of some latency we are seeing in server response.

Here are examples of such queries:

| 389163 | ticasc5_imga1 | localhost | ticasc5_Hi5 | Query   | 0    | Copying to tmp table | SELECT DISTINCT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords |

In order to maintain stability and responsiveness in the shared environment, you will need to review the site to see if you can make any changes that can better the efficiency of these queries.

Thank you in advance for your cooperation, and feel free to let us know if you have any further questions or if we can be of assistance.

Best Regards,

Marco
InMotion Hosting
System Administration 

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: My site is down, help please!
« Reply #1 on: April 09, 2009, 02:06:21 PM »
That query seems to be for random image.
try this:
Pages load very slowly
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline artmedia

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Fotos de chicas
Re: My site is down, help please!
« Reply #2 on: April 09, 2009, 07:06:54 PM »
vano, thank you so much, i have made that modification, now i have to wait the hosting answer, anyway where is executed that query? in what pages or sections? i think it was home, but now i have

define('SHOW_RANDOM_IMAGE', 0);
define('SHOW_RANDOM_CAT_IMAGE', 0);

and i still having the random for category in home page, kind of weird...

Is there any other query taking high processing in this gallery application?

i have around 2000 visitors per day, it this normal for this gallery?

Thanks again.

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: My site is down, help please!
« Reply #3 on: April 09, 2009, 08:40:31 PM »
the query you showed comes from includes/functions.php (by the way it's not original query)

As of 2000 visitors per day, I don't know, but I think it's little too much for a shared server...
And by the way similar query used in signature mod too.
« Last Edit: April 10, 2009, 02:48:21 AM by V@no »
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline artmedia

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Fotos de chicas
Re: My site is down, help please!
« Reply #4 on: April 14, 2009, 05:15:32 PM »
V@no, atfer change the random values, they send me this email:

Hello,

We are still seeing the issue, though not as bad as it was before.  The database ticasc5_imga1 has queries copying to the tmp table, and executing for longer than they should be.  A normal MySQL query should take less than 2 seconds to execute, and most of yours are taking 5-20 seconds meaning that your database may be lacking optimization.  Adding indexes on search-able fields should help with this.


I have optimized every table throught phphmyadmin, but about indexes for search-able fields, is this gallery using that? It's to difficult create them?

Thanks for your help,

Note: can you suggest contact some programmer that created this gallery (the queries and DB part) in order to get some information?

Offline artmedia

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Fotos de chicas
Re: My site is down, help please!
« Reply #5 on: April 14, 2009, 05:29:34 PM »
By the way, I have these red information on my database Runtime Information: (I'm not a database expert, that's why I'll almost don't understand anything...)

Slow_queries     644      The number of queries that have taken more than long_query_time seconds.Documentation
Innodb_buffer_pool_reads     2,549     The number of logical reads that InnoDB could not satisfy from buffer pool and had to do a single-page read.
Innodb_log_waits     1     The number of waits we had because log buffer was too small and we had to wait for it to be flushed before continuing.
Innodb_row_lock_time_avg     18      The average time to acquire a row lock, in milliseconds.
Innodb_row_lock_waits     3      The number of times a row lock had to be waited for.
Handler_read_rnd     1,699 M     The number of requests to read a row based on a fixed position. This is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don't use keys properly.
Handler_read_rnd_next    1,029 M    The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.
Created_tmp_disk_tables     880 k     The number of temporary tables on disk created automatically by the server while executing statements. If Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based.
Select_full_join     107 k     The number of joins that do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.
Sort_merge_passes     3     The number of merge passes the sort algorithm has had to do. If this value is large, you should consider increasing the value of the sort_buffer_size system variable.
Opened_tables     74 k     The number of tables that have been opened. If opened tables is big, your table cache value is probably too small.
Table_locks_waited     53 k     The number of times that a table lock could not be acquired immediately and a wait was needed. If this is high, and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication. 

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: My site is down, help please!
« Reply #6 on: April 14, 2009, 07:30:12 PM »
4images doesn't have any database query that use tmp tables, its probably a mod you've installed
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.