designbai Posted June 22, 2011 Share Posted June 22, 2011 Hi All, I have a php script which runs in a loop get 440 soap request to fetch some data feed. I need to run this script using cron. The problem I am facing here is: if I use wget, after some point of time let us say, after 300 requests, the script starts again and run from the start. The same php code, If I run in browswer, it completes one full loop of 440 and the script exits. As for my understanding there is no memory problem, I have 4gb or ram and ini set memory limit of 1GB in the code. I am sure I unset all the variable in the loop. For the past 48 hours I am totally distorted. Any help would be highly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/240074-php-script-in-wget-vs-browser-issue/ Share on other sites More sharing options...
designbai Posted June 22, 2011 Author Share Posted June 22, 2011 The issue RESOLVED. That is because of the default Wget timeout. By default it is set to 900seconds. I tested with more than 900 sec and it worked. Because the script takes more than 900 seconds to complete, that is the reason why it restarts again. I tested with --timeout=1800 it worked. To disable this, use --timeout=0. Quote Link to comment https://forums.phpfreaks.com/topic/240074-php-script-in-wget-vs-browser-issue/#findComment-1233202 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.