** Changed in: tarantool
Milestone: None => 1.5.1
** Changed in: tarantool
Status: New => Confirmed
** Changed in: tarantool
Status: Confirmed => Fix Released
--
You received this bug notification because you are a member of Tarantool
Development Team, which is subscribed to tarantool.
https://bugs.launchpad.net/bugs/1182474
Title:
PHP driver throws an exception when response body larger than 65535
bytes
Status in Tarantool - an efficient in-memory data store:
Fix Released
Bug description:
PHP driver throws exception when response body larger than 65535 bytes
PHP Fatal error: Uncaught exception 'Exception' with message 'failed to
receive response: eof when reading response body' in foo.php:20
Stack trace:
#0 foo.php(20): Tarantool->select(1, 5, Array)
#2 {main}
thrown in /data/work/tarantool/master/test/var/1/foo.php on line 20
This problem happens because PHP API operation does not match the
documentation.
------------------
size_t php_stream_read ( php_stream * stream, char * buf, size_t count)
If less than count bytes are available to be read, this call **will block (or
wait)** until the required number are available, depending on the blocking
status of the stream. By default, a stream is opened in blocking mode.
--------------------
In real life this method blocks but returns data with smaller chunks:
--------------------
length: 156591
got2: buf_size=156591 read_bytes=16372 total=24564
got2: buf_size=156591 read_bytes=8192 total=24564
got2: buf_size=156591 read_bytes=8192 total=32756
got2: buf_size=156591 read_bytes=8192 total=40948
got2: buf_size=156591 read_bytes=8192 total=49140
got2: buf_size=156591 read_bytes=8192 total=57332
got2: buf_size=156591 read_bytes=8192 total=65524
got2: buf_size=156591 read_bytes=8192 total=73716
got2: buf_size=156591 read_bytes=8192 total=81908
got2: buf_size=156591 read_bytes=8192 total=90100
got2: buf_size=156591 read_bytes=8192 total=98292
got2: buf_size=156591 read_bytes=8192 total=106484
got2: buf_size=156591 read_bytes=8192 total=114676
got2: buf_size=156591 read_bytes=8192 total=122868
got2: buf_size=156591 read_bytes=8192 total=131060
got2: buf_size=156591 read_bytes=8192 total=139252
got2: buf_size=156591 read_bytes=8192 total=147444
got2: buf_size=156591 read_bytes=8192 total=155636
got2: buf_size=156591 read_bytes=955 total=156591
--------------------
To manage notifications about this bug go to:
https://bugs.launchpad.net/tarantool/+bug/1182474/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help : https://help.launchpad.net/ListHelp