Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

30 Seconds Error, Please help Live shop down!!


xearoth

Recommended Posts

Any help is much appreciated ahead of time.

 

I have not done anything to our site and just noticed nobody can get to anything with this error showing

 

Fatal error: Maximum execution time of 30 seconds exceeded in D:\www\includes\functions\database.php on line 44

 

Does anybody know how to fix this?

Link to comment
Share on other sites

Most PHP servers have a default setting to terminate every script after running for 30 seconds.

This is to prevent a script falling into an endless loop and keep on eating CPU resources forever...

 

Being that your error is generated in the database.php file, your problem might be something too big in your database which takes more than 30 seconds to load, or some connection attempt which isn't completed within this time.

 

I'm just beggining to get a handle of PHP and MySQL, so my advice might not be the most trusty one, but I think that's something to start with. :)

Link to comment
Share on other sites

IN the file that I have here, line 44 is this:

 

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

 

So there's a lot of chance of your problem being database related. Sometimes your host might have changed something without you knowing, thus you're getting this error.

 

By the way, this line 44 is part of a function which is directely related to DB connection, so one more point in suggesting it is database related.

 

function tep_db_query($query, $link = 'db_link') {
global $$link;

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
  error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
   $result_error = mysql_error();
   error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

return $result;
 }

Link to comment
Share on other sites

ended up i came to find out the drive allocation was full on my server, sorry for this, and thanks for the help

 

You're welcome!! :) :thumbsup:

 

I'm glad to you got it working again. Indeed it's really frustrating when a live shop is down, and your anxiety and nervousness level go way up! I've been there so many times already. :P

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...