3

I have some db query in my php file, approximately after 40 second, happened INTERNAL SERVER ERROR, though in php.ini file this settings are set:

memory_limit         8192M
max_execution_time   120

I think this settingst is enough, other what reason may causes INTERNAL SERVER ERROR after long time running of php script?

Till Helge
  • 9,253
  • 2
  • 40
  • 56
Oto Shavadze
  • 40,603
  • 55
  • 152
  • 236
  • 1
    That's a generic HTTP status code that means that your script is throwing an error but you haven't configured PHP to display error messages. That's something you need to fix before you go further; it's impossible to code without the aid of error messages. Here's a [brief explanation](http://stackoverflow.com/a/5680885/13508). – Álvaro González Apr 24 '13 at 10:43
  • I set `ini_set('display_errors', 1); error_reporting(~0);` but php not returns any error, after several second, just commonly `INTERNAL SERVER ERROR` message returned. – Oto Shavadze Apr 24 '13 at 10:58
  • Then you need to find the web server logs. Guessing is the hard way. – Álvaro González Apr 24 '13 at 11:17

2 Answers2

1

set

ini_set('max_execution_time' ,0);       
ini_set('set_memory_limit', -1)
chandresh_cool
  • 11,753
  • 3
  • 30
  • 45
1

The question is old but this might work for someone.

Use this for every iteration of your loop sleep(0.5); 0.5 is user defined you can change it.

Winter
  • 3,894
  • 7
  • 24
  • 56
birkan
  • 41
  • 5