For the past week or so I have been getting seemingly random errors on my RETS queries.
This script runs every morning at the same time and has been running without issue for almost 2 months. Now all of the sudden, I am getting errors like the one below. The trace is always pointing to a different line number, but it is always during the Session->Search.
[14-Oct-2015 11:57:00 US/Central] PHP Fatal error: Uncaught exception 'PHRETS\Exceptions\RETSException' with message 'Invalid Query Syntax' in C:\Scheduled_Tasks\report_manager\vendor\troydavisson\phrets\src\Session.php:378
Stack trace:
#0 C:\Scheduled_Tasks\report_manager\vendor\troydavisson\phrets\src\Session.php(296): PHRETS\Session->request('Search', Array)
#1 C:\Scheduled_Tasks\report_manager\mtsir.php(9): PHRETS\Session->Search('PROPERTY', 'LND', '(OFFICELIST=TRN...', Array)
#2 C:\Scheduled_Tasks\report_manager\index.php(25): include('C:\Scheduled_Ta...')
#3 {main}
thrown in C:\Scheduled_Tasks\report_manager\vendor\troydavisson\phrets\src\Session.php on line 378
Here is an example query that is receiving the error.
$rets->Search('PROPERTY', 'RES' ,'(OFFICELIST=TRNR*),(LISTSTATUS=|ACT)',['Select' => 'LISTPRICE,DAYSONMARKETCUMULATIVE','Format' => 'COMPACT-DECODED']);
I'll add that the RETS service I am using has also been returning random 502 Bad Gateway errors and timing up due to throughput issues.