workerman-thrift-rpc做服务端, java端 client 调用时而超时 时而成功?

我在用workerman-thrift-rpc做服务端
用以下方式
$worker->thriftProtocol='TCompactProtocol';
$worker->thriftTransport='TFramedTransport';
java端作为客户端,调用会出现
2019-03-21 10:04:50 pid:3053496 CODE:0 MESSAGE:TSocket: timed out reading 4 bytes from 192.168.3.**:20569
#0 /srv/qijizuopin_rpc/Applications/ThriftRpc/Lib/Thrift/Transport/TTransport.php(75): Thrift\Transport\TSocket->read(4)
#1 /srv/qijizuopin_rpc/Applications/ThriftRpc/Lib/Thrift/Transport/TFramedTransport.php(147): Thrift\Transport\TTransport->readAll(4)
#2 /srv/qijizuopin_rpc/Applications/ThriftRpc/Lib/Thrift/Transport/TFramedTransport.php(110): Thrift\Transport\TFramedTransport->readFrame()
#3 /srv/qijizuopin_rpc/Applications/ThriftRpc/Lib/Thrift/Transport/TTransport.php(75): Thrift\Transport\TFramedTransport->read(1)
#4 /srv/qijizuopin_rpc/Applications/ThriftRpc/Lib/Thrift/Protocol/TCompactProtocol.php(431): Thrift\Transport\TTransport->readAll(1)
#5 /srv/qijizuopin_rpc/Applications/ThriftRpc/Lib/Thrift/Protocol/TCompactProtocol.php(509): Thrift\Protocol\TCompactProtocol->readUByte(0)
#6 /srv/qijizuopin_rpc/Applications/ThriftRpc/Services/SearchBookListChapters/SearchBookListChapters.php(266): Thrift\Protocol\TCompactProtocol->readMessageBegin(NULL, 0, 0)
#7 /srv/qijizuopin_rpc/Applications/ThriftRpc/ThriftWorker.php(143): Services\SearchBookListChapters\SearchBookListChaptersProcessor->process(Object(Thrift\Protocol\TCompactProtocol), Object(Thrift\Protocol\TCompactProtocol))
#8 [internal function]: ThriftWorker->onConnect(Object(Workerman\Connection\TcpConnection))
#9 /srv/qijizuopin_rpc/vendor/workerman/workerman/Worker.php(1527): call_user_func(Array, Object(Workerman\Connection\TcpConnection))
#10 [internal function]: Workerman\Worker->acceptConnection(Resource id #41, 2, Resource id #41)
#11 /srv/qijizuopin_rpc/vendor/workerman/workerman/Events/Event.php(186): EventBase->loop()
#12 /srv/qijizuopin_rpc/vendor/workerman/workerman/Worker.php(1471): Workerman\Events\Event->loop()
#13 /srv/qijizuopin_rpc/vendor/workerman/workerman/Worker.php(899): Workerman\Worker->run()
#14 /srv/qijizuopin_rpc/vendor/workerman/workerman/Worker.php(865): Workerman\Worker::forkOneWorker(Object(ThriftWorker))
#15 /srv/qijizuopin_rpc/vendor/workerman/workerman/Worker.php(420): Workerman\Worker::forkWorkers()
#16 /srv/qijizuopin_rpc/start.php(29): Workerman\Worker::runAll() 
这种情况是我服务端哪里配置有问题么?
已邀请:

walkor

赞同来自: 小白鼠

看报错是客户端连接到服务端后一直没有发来请求数据,导致服务端接收数据超时。
 
注意workerman-thrift-rpc是一个短连接服务,客户端连上服务端后要马上把请求发过来。

要回复问题请先登录注册