-1

I have a script that is called over apache 2.4 on Ubuntu 14.10. All sites work fine but one that doesn't work on one of my computers. The page-generation dies after exactly 900 seconds (15 Minutes).

In my /etc/php5/apache2/php.ini there is no such timeout.

What could it be, that waits 900 seconds before it timeouts?

Here is my php.ini

I have installed php5-ssh2, mysql, ... everything standard debian Ubuntu otherwise

EDIT: could it be connected with nfs?
Because the only value of 900 in my whole /etc folder is:

find /etc/ -type f -name "*" -exec grep -H "=900" {} \;
/etc/init.d/mountnfs.sh:    TIMEOUT=900
rubo77
  • 19,527
  • 31
  • 134
  • 226
  • Why does it keep running for 15 minutes? For any database operations or external communication? depends upon a lot of factors – Hanky Panky Dec 12 '14 at 09:41
  • I updated my answer. It has nothing to do with CLI – rubo77 Dec 12 '14 at 09:42
  • There could be some external communication, but the script is really huge and it works fine on other mashines. It prepares something to upload via ssh2lib but before it starts it seem to hang. I try to find out by which timeout it is caused to figure out where to search in the code – rubo77 Dec 12 '14 at 09:44
  • enable `error_log` and look there – Deadooshka Dec 12 '14 at 09:44
  • does apache restart after 900s ? – Alex Dec 12 '14 at 09:46
  • It doesn't have to be 900 seconds, it can be 45 * 20 seconds (your default_socket_timeout setting) or 15 * 60 (your mysql.connect_timeout setting) – Marek Dec 12 '14 at 09:55
  • No Errors in the log. Nice idea with 45*20s. I will check that. Apache doesn't restart – rubo77 Dec 12 '14 at 09:57

1 Answers1

0

There doesn't seem to be any such value in the PHP configuration.

I also checked .htaccess in my site.

In the end I found the solution by searching through my site by several fractions of 900:

find . -type f -name "*" -exec egrep -H "=20\*45" {} \;
find . -type f -name "*" -exec egrep -H "=15\*60" {} \;

and finally found such a limit inside the code:

./app/controllers/jobs_controller.php: $maxwait=15*60; // wait seconds till quit (15 Minutes)

The largest Error Source usually sits 30 cm in front of the screen

rubo77
  • 19,527
  • 31
  • 134
  • 226
  • 1
    Great find. Just a couple of comments: `egrep -rH "=20\*45" *` would do the same, `"=\s*20\*\s*45"` would allow for spaces, and you sit too close to the monitor ;) – Marek Dec 12 '14 at 11:39