Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the new v2.0 can not use in product env #19

Open
w3yyb opened this issue Apr 12, 2017 · 8 comments
Open

the new v2.0 can not use in product env #19

w3yyb opened this issue Apr 12, 2017 · 8 comments

Comments

@w3yyb
Copy link

w3yyb commented Apr 12, 2017

In the high load env, the v2.0 often report the following error:
fwrite(): send of 2 bytes failed with errno=32 Broken pipe file:

but the old v1.0 can work well Basically.

@sskaje
Copy link
Owner

sskaje commented Apr 12, 2017

How to reproduce and where this fwrite error occurs ?

@w3yyb
Copy link
Author

w3yyb commented Apr 12, 2017

PHP Notice: fwrite(): send of 2 bytes failed with errno=32 Broken pipe in /var/www/html/phalconapi/app/library/mqtt/SocketClient.php on line 166

@w3yyb
Copy link
Author

w3yyb commented Apr 12, 2017

code:
$cpush = new MQTT('tcp://'.$config->host.':'.$config->port.'/', $pclientid);
$context = stream_context_create();
$cpush->setSocketContext($context);
$cpush->setVersion(MQTT::VERSION_3_1_1);
$cpush->setKeepalive(60);
$cpush->setConnectClean(true);
$connected = $cpush->connect();
$cpush->setRetryTimeout(5);
$myhandler = new \MyPublishHandler();
$pushed = $cpush->publish_async($json->Subject, $content, $config->qos, $config->retain,$msgid);
$myhandler->waitQueue[$pushed['msgid']] = $pushed;
$cpush->setHandler($myhandler);
$cpush->loop();

@w3yyb
Copy link
Author

w3yyb commented Apr 12, 2017

and often throw new Exception('WTFFFFFF!!!! '); too. in MQTT.php 1285行.

@nielsenaa
Copy link

nielsenaa commented Jul 13, 2017

Hi guys,

i also get thrown at the wtf exception in MQTT.php;
i seems it depends on message specific content char combination being sent on publish (i am using qos2 async)
i pass alot of ESC chars in there and on specific conditions, exception fires up.. i doesnt seem to be affected by overall payload length / "size".. can reproduce but cannot debug for sure !

@sskaje
Copy link
Owner

sskaje commented Jul 13, 2017

@nielsenaa please give me a copy of your message

@nielsenaa
Copy link

nielsenaa commented Jul 13, 2017 via email

@nielsenaa
Copy link

nielsenaa commented Jul 13, 2017

care to chat ? @nielsenaa on skype

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants