duanjiaolao1187
duanjiaolao1187
2018-11-08 08:45

PHP,RabbitMQ消息到bit fwrite异常

已采纳

i'm using rabbitMQ in centos, and i encounter error when i try to sent message that exceeds ~120kb then i have php exception

In StreamIO.php line 301:

fwrite(): send of 568 bytes failed with errno=11 Resource temporarily unavailable 

with messages that are lighter all is ok, my rabbitmqctl status is this

[{pid,15256},
{running_applications,
    [{rabbitmq_management,"RabbitMQ Management Console","3.7.8"},
    {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.7.8"},
    {rabbitmq_management_agent,"RabbitMQ Management Agent","3.7.8"},
    {rabbit,"RabbitMQ","3.7.8"},
    {mnesia,"MNESIA  CXC 138 12","4.15.5"},
    {amqp_client,"RabbitMQ AMQP Client","3.7.8"},
    {rabbit_common,
        "Modules shared by rabbitmq-server and rabbitmq-erlang-client",
        "3.7.8"},
    {ranch_proxy_protocol,"Ranch Proxy Protocol Transport","1.5.0"},
    {cowboy,"Small, fast, modern HTTP server.","2.2.2"},
    {ranch,"Socket acceptor pool for TCP protocols.","1.5.0"},
    {ssl,"Erlang/OTP SSL application","9.0.3"},
    {public_key,"Public key infrastructure","1.6.2"},
    {cowlib,"Support library for manipulating Web protocols.","2.1.0"},
    {crypto,"CRYPTO","4.3.3"},
    {xmerl,"XML parser","1.3.18"},
    {asn1,"The Erlang ASN1 compiler version 5.0.7","5.0.7"},
    {inets,"INETS  CXC 138 49","7.0.2"},
    {os_mon,"CPO  CXC 138 46","2.4.6"},
    {recon,"Diagnostic tools for production use","2.3.2"},
    {jsx,"a streaming, evented json parsing toolkit","2.8.2"},
    {lager,"Erlang logging framework","3.6.3"},
    {goldrush,"Erlang event stream processor","0.1.9"},
    {compiler,"ERTS  CXC 138 10","7.2.6"},
    {syntax_tools,"Syntax tools","2.1.6"},
    {syslog,"An RFC 3164 and RFC 5424 compliant logging framework.","3.4.3"},
    {sasl,"SASL  CXC 138 11","3.2.1"},
    {stdlib,"ERTS  CXC 138 10","3.6"},
    {kernel,"ERTS  CXC 138 10","6.1"}]},
{os,{unix,linux}},
{erlang_version,
    "Erlang/OTP 21 [erts-10.1.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:64] [hipe]
"},
{memory,
    [{connection_readers,0},
    {connection_writers,0},
    {connection_channels,0},
    {connection_other,30524},
    {queue_procs,139620},
    {queue_slave_procs,0},
    {plugins,1935536},
    {other_proc,25754188},
    {metrics,202260},
    {mgmt_db,520784},
    {mnesia,80336},
    {other_ets,2764424},
    {binary,3185424},
    {msg_index,171784},
    {code,23286871},
    {atom,1131721},
    {other_system,10675296},
    {allocated_unused,13024272},
    {reserved_unallocated,0},
    {strategy,rss},
    {total,[{erlang,69878768},{rss,82661376},{allocated,82903040}]}]},
{alarms,[]},
{listeners,[{clustering,25672,"::"},{amqp,5672,"::"},{http,15672,"::"}]},
{vm_memory_calculation_strategy,rss},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,3395312025},
{disk_free_limit,50000000},
{disk_free,44361175040},
{file_descriptors,
    [{total_limit,32668},
    {total_used,5},
    {sockets_limit,29399},
    {sockets_used,0}]},
{processes,[{limit,1048576},{used,388}]},
{run_queue,1},
{uptime,5178},
{kernel,{net_ticktime,60}}]

i'm new to rabbitmq so there is much that i don't know, so if anybody can help me, detecting what is not right

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • dongnei3634 dongnei3634 3年前

    This is a known issue in version 2.8.0 of PhpAmqpLib. The official recommendation is to fall back to 2.7.3 until it's resolved in 2.8.1.

    点赞 评论 复制链接分享

为你推荐