{"issue":{"created_at":"2011-11-21T14:30:15Z","state":"open","updated_at":"2011-11-23T20:41:07Z","comments":4,"user":{"gravatar_id":"251eedee3a590dac25b7cbf83d2bdb8f","id":156149,"url":"https://api.github.com/users/Reinmar","login":"Reinmar","avatar_url":"https://secure.gravatar.com/avatar/251eedee3a590dac25b7cbf83d2bdb8f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Hi,\r\nI 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.\r\n\r\nI uploaded description and results of our tests here: https://github.com/zpi2011asvis/asvis/blob/master/tests/gloowa/connections_meta_debug.txt\r\n\r\nFirst part is how and what we dump (one of the requests).\r\nThen 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.\r\nThen there are results for curling from console our rest api (results for var_dumps).\r\n\r\nAs 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.\r\n\r\nSecond dump is from Response object and it shows that http response is incorrectly parsed. This is of course because of previous errors.\r\n\r\nI think that this is caused by OrientDB's bug. It probably doesn't properly clear buffers when queried one after another.\r\n\r\nFast 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.\r\n\r\nI'm also posting this issue on Orient's bugtracker and let you know if they found something.","assignee":null,"id":2305111,"number":114,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Multiple (fast) querying breaks responses","closed_at":null,"html_url":"https://github.com/congow/Orient/issues/114","milestone":null,"url":"https://api.github.com/repos/congow/Orient/issues/114"},"action":"created","comment":{"created_at":"2011-11-23T20:41:07Z","updated_at":"2011-11-23T20:41:07Z","user":{"gravatar_id":"1c29f9b1bf5f1b88ed8b0c9a9be39788","id":17923,"url":"https://api.github.com/users/nrk","login":"nrk","avatar_url":"https://secure.gravatar.com/avatar/1c29f9b1bf5f1b88ed8b0c9a9be39788?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Quick update: I was finally able to reproduce the same issue and it doesn't look something related to any specific version of PHP since I got it with PHP 5.3 and 5.4, but I don't think it's something related to our user-land PHP code in Orient either. Both the interpreters were built against libcurl 7.21.6, that's a starting point. Anyway, I will dig into the problem later this week.\r\n\r\n```\r\nPHP 5.3.6-13ubuntu3.2 with Suhosin-Patch (cli) (built: Oct 13 2011 23:19:13) \r\nCopyright (c) 1997-2011 The PHP Group\r\nZend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies\r\n    with XCache v1.3.2, Copyright (c) 2005-2011, by mOo\r\n    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH\r\n```\r\n\r\n```\r\nPHP 5.5.0-dev (cli) (built: Oct 23 2011 12:03:02) \r\nCopyright (c) 1997-2011 The PHP Group\r\nZend Engine v2.4.0, Copyright (c) 1998-2011 Zend Technologies\r\n```","id":2854540,"url":"https://api.github.com/repos/congow/Orient/issues/comments/2854540"}}