Ostico / PhpOrient

PhpOrient - Official Php driver based on the binary protocol of OrientDB.
Other
68 stars 37 forks source link

Invalid argument supplied for foreach() in getNodesList #51

Closed ncreea closed 8 years ago

ncreea commented 8 years ago

I recently updated our OrientDB to 2.1.3 and had to update the library (to the latest via composer) too. Now in logs I see a few PHP Warnings like below, but It's not happening all the time:

Invalid argument supplied for foreach() in /vendor/ostico/phporient/src/PhpOrient/Protoco ls/Common/AbstractTransport.php on line 154

pentium10 commented 8 years ago

We have the same issue? any update on this @Ostico ? As it looks it happens with today's composer build too.

ncreea commented 8 years ago

Update: This Warning is generated when a query responds with timeout. (Eg. a select query with TIMEOUT that gets interrupted by timeout)

andreyvk commented 8 years ago

Is this issue causing any undesired behavior?

According to the code, list of nodes is a bunch of orientdb distributed nodes. So possibly that list is empty, if there's a timeout, thus causing the warning.

ncreea commented 8 years ago

No, it seams that is not causing any undesired behavior other then filling up the error_log and sending out email alerts in case you have email alerts on error logs enabled.

andreyvk commented 8 years ago

I see. Would be nice to fix that eventually of course. Hope @Ostico can get to that as soon as he can

pentium10 commented 8 years ago

I hope @Ostico will have time to fix the multiple issues reported with the library lately, as more and more people start using on production servers

Ostico commented 8 years ago

Yes guys, this weekend i will try to fix your issues. Btw, can you provide more info on how reproduce your issues, more environment info and code snippets? Tnx in advance

ncreea commented 8 years ago

Reproduce: Try to execute any SELECT query on any system you have, but make sure you set a TIMEOUT lower then Orient is able to execute it.

Ostico commented 8 years ago

Fixed in next release.