congow/Orient — Issue #114: Multiple (fast) querying breaks responses
Author: Reinmar
Created: 2011-11-21 14:30:15+00:00
State: open

Hi,
I found strange error. When I do three quite heavy queries (one after another) sometimes the second or third response is broken. It contains content from earlier queries.

I uploaded description and results of our tests here: https://github.com/zpi2011asvis/asvis/blob/master/tests/gloowa/connections_meta_debug.txt

First part is how and what we dump (one of the requests).
Then is the change in Curl::execute - it was important not to dump from there, because then the error was not occurring. I think that because of time that dumping takes it caused too big gap between two requests.
Then there are results for curling from console our rest api (results for var_dumps).

As you can see they start with schema, then are results (not for the last query, but the first we did), then http headers (!), then results again, then schema again (but without comma after previous results) and at the end results.

Second dump is from Response object and it shows that http response is incorrectly parsed. This is of course because of previous errors.

I think that this is caused by OrientDB's bug. It probably doesn't properly clear buffers when queried one after another.

Fast fix we found for that was to force new curl handle creation after doing request. So there is small chance that this is caused by some curl/PHP bug but I can't prove whose.

I'm also posting this issue on Orient's bugtracker and let you know if they found something.