First time here? Check out the FAQ!
0

Timeout Issues pulling Data in PHRETS

  • retag add tags

I'm trying to pull about 1000 records and I get about 400 records in before I get the message "Maximum execution time of 120 seconds exceeded". Is there anyway around the 120 seconds?

zslagowski's avatar
zslagowski
asked 2020-12-02 16:56:16 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

We have had this issue as well. We now pull 100 properties at a time, pause for a few seconds, and then reconnect. Our process is to pull listings into a local database overnight and download associated images. We purge images once/week for properties no longer in the database.

IMCBeth's avatar
IMCBeth
answered 2020-12-08 07:25:49 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

You can try this to handle connection timeout:
ini_set("default_socket_timeout", 6000); // seconds

The "Maximum execution time of 120 seconds exceeded" is a PHP script execution error, not RETS.
Internet search for that error, shows you may be able to add this to your script:
ini_set("max_execution_time", 300); // 300 seconds
Or set the value directly in the PHP.INI file.
max_execution_time = 300

bwolven's avatar
bwolven
answered 2020-12-02 17:25:48 -0500, updated 2020-12-08 09:47:41 -0500
edit flag offensive 0 remove flag delete link

Comments

Were you able to get this working?
Also, what RETS URL were you using?

bwolven's avatar bwolven (2020-12-07 08:50:45 -0500) edit

Yes, it worked. I ended up adding ini_set("max_execution_time", 0); to my functions.php file for a WP site since 300 seconds wasn't long enough. Thanks!

zslagowski's avatar zslagowski (2020-12-09 12:44:34 -0500) edit

Glad to hear that you got it working now.
One thing to remember is that there are other factors that can add into the script timing.
Writing out the data to a file or to a database which can all add to the script execution time.

bwolven's avatar bwolven (2020-12-09 18:08:27 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer