php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58381 problem with get() via UDP
Submitted: 2008-10-16 14:03 UTC Modified: 2011-03-10 21:57 UTC
From: debianbug at fidointelligence dot pl Assigned: hradtke (profile)
Status: No Feedback Package: memcache (PECL)
PHP Version: 5.2.0 OS: Debian Etch
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: debianbug at fidointelligence dot pl
New email:
PHP Version: OS:

 

 [2008-10-16 14:03 UTC] debianbug at fidointelligence dot pl
Description:
------------
I have a problem with memcached running on udp. get() doesn't seem to work as desired. The same script works ok on TCP (setting udp port to 0 in connect()).

memcached:

/usr/bin/memcached -vvv -m 256 -p 11211 -U 11211 -u www-data
slab class   1: chunk size     88 perslab 11915
slab class   2: chunk size    112 perslab  9362
slab class   3: chunk size    144 perslab  7281
slab class   4: chunk size    184 perslab  5698
slab class   5: chunk size    232 perslab  4519
slab class   6: chunk size    296 perslab  3542
slab class   7: chunk size    376 perslab  2788
slab class   8: chunk size    472 perslab  2221
slab class   9: chunk size    592 perslab  1771
slab class  10: chunk size    744 perslab  1409
slab class  11: chunk size    936 perslab  1120
slab class  12: chunk size   1176 perslab   891
slab class  13: chunk size   1472 perslab   712
slab class  14: chunk size   1840 perslab   569
slab class  15: chunk size   2304 perslab   455
slab class  16: chunk size   2880 perslab   364
slab class  17: chunk size   3600 perslab   291
slab class  18: chunk size   4504 perslab   232
slab class  19: chunk size   5632 perslab   186
slab class  20: chunk size   7040 perslab   148
slab class  21: chunk size   8800 perslab   119
slab class  22: chunk size  11000 perslab    95
slab class  23: chunk size  13752 perslab    76
slab class  24: chunk size  17192 perslab    60
slab class  25: chunk size  21496 perslab    48
slab class  26: chunk size  26872 perslab    39
slab class  27: chunk size  33592 perslab    31
slab class  28: chunk size  41992 perslab    24
slab class  29: chunk size  52496 perslab    19
slab class  30: chunk size  65624 perslab    15
slab class  31: chunk size  82032 perslab    12
slab class  32: chunk size 102544 perslab    10
slab class  33: chunk size 128184 perslab     8
slab class  34: chunk size 160232 perslab     6
slab class  35: chunk size 200296 perslab     5
slab class  36: chunk size 250376 perslab     4
slab class  37: chunk size 312976 perslab     3
slab class  38: chunk size 391224 perslab     2
slab class  39: chunk size 489032 perslab     2
<6 server listening
<7 send buffer was 110592, now 268435456
<7 server listening (udp)
<8 new client connection
<8 set key 0 0 5
>8 STORED
<7 get key
>7 sending key key
>7 END
<8 connection closed.

Server is listening on UDP port and receives the "get key" datagram.

Reproduce code:
---------------
<?php

error_reporting(E_ALL);

$a = new MemcachePool;
$a->connect('localhost',11211,11211);

$a->set('key','value');
$test =  $a->get('key');

$a->close();

var_dump($test);

?>


Expected result:
----------------
string(5) "value"

Actual result:
--------------
Notice: MemcachePool::get(): Server localhost (tcp 11211, udp 11211) failed with: Network timeout (0) in /home/test/www/test.php on line 9
bool(false)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-05 11:16 UTC] hradtke@php.net
I cannot recreate this.  What version of memcached are you using and what version of PECL memcache are you using?  My verbose output from memcached looks much different from yours:

hradtke@dev01 ~ !! sudo /usr/local/memcached-1.4.5/bin/memcached -l 127.0.0.1 -p 11213 -U 11213 -m 256 -d -u nobody -vvv
slab class   1: chunk size        80 perslab   13107
slab class   2: chunk size       104 perslab   10082
slab class   3: chunk size       136 perslab    7710
slab class   4: chunk size       176 perslab    5957
slab class   5: chunk size       224 perslab    4681
slab class   6: chunk size       280 perslab    3744
slab class   7: chunk size       352 perslab    2978
slab class   8: chunk size       440 perslab    2383
slab class   9: chunk size       552 perslab    1899
slab class  10: chunk size       696 perslab    1506
slab class  11: chunk size       872 perslab    1202
slab class  12: chunk size      1096 perslab     956
slab class  13: chunk size      1376 perslab     762
slab class  14: chunk size      1720 perslab     609
slab class  15: chunk size      2152 perslab     487
slab class  16: chunk size      2696 perslab     388
slab class  17: chunk size      3376 perslab     310
slab class  18: chunk size      4224 perslab     248
slab class  19: chunk size      5280 perslab     198
slab class  20: chunk size      6600 perslab     158
slab class  21: chunk size      8256 perslab     127
slab class  22: chunk size     10320 perslab     101
slab class  23: chunk size     12904 perslab      81
slab class  24: chunk size     16136 perslab      64
hradtke@dev01 ~ !! slab class  25: chunk size     20176 perslab      51
slab class  26: chunk size     25224 perslab      41
slab class  27: chunk size     31536 perslab      33
slab class  28: chunk size     39424 perslab      26
slab class  29: chunk size     49280 perslab      21
slab class  30: chunk size     61600 perslab      17
slab class  31: chunk size     77000 perslab      13
slab class  32: chunk size     96256 perslab      10
slab class  33: chunk size    120320 perslab       8
slab class  34: chunk size    150400 perslab       6
slab class  35: chunk size    188000 perslab       5
slab class  36: chunk size    235000 perslab       4
slab class  37: chunk size    293752 perslab       3
slab class  38: chunk size    367192 perslab       2
slab class  39: chunk size    458992 perslab       2
slab class  40: chunk size    573744 perslab       1
slab class  41: chunk size    717184 perslab       1
slab class  42: chunk size   1048576 perslab       1
<26 server listening (auto-negotiate)
<27 send buffer was 110592, now 268435456
<27 server listening (udp)
<27 server listening (udp)
<27 server listening (udp)
<27 server listening (udp)
<28 new auto-negotiating client connection
28: going from conn_new_cmd to conn_waiting
28: going from conn_waiting to conn_read
28: going from conn_read to conn_parse_cmd
28: Client using the ascii protocol
<28 set key 0 0 5
28: going from conn_parse_cmd to conn_nread
> NOT FOUND key
>28 STORED
28: going from conn_nread to conn_write
28: going from conn_write to conn_new_cmd
28: going from conn_new_cmd to conn_waiting
28: going from conn_waiting to conn_read
27: going from conn_read to conn_parse_cmd
27: Client using the ascii protocol
<27 get key
> FOUND KEY key
>27 sending key key
>27 END
27: going from conn_parse_cmd to conn_mwrite
27: going from conn_mwrite to conn_new_cmd
27: going from conn_new_cmd to conn_waiting
27: going from conn_waiting to conn_read
28: going from conn_read to conn_closing
<28 connection closed.
 [2011-03-10 21:57 UTC] hradtke@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 08 12:03:36 2021 UTC