Jump to content

PHP script in Wget vs Browser issue


designbai

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/240074-php-script-in-wget-vs-browser-issue/
Share on other sites

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.

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.