User "Tim Starling" posted a comment on MediaWiki.r97328. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97328#c23065 Commit summary:
Noticed in apache error logs (see below). If the length of the message is longer than the maximum length, only send what will fit Sep 16 20:07:28 10.0.2.193 apache2[28441]: PHP Warning: socket_sendto() [<a href='function.socket-sendto'>function.socket-sendto</a>]: unable to write to socket [90]: Message too long in /home/wikipedia/common/php-1.17-test/includes/GlobalFunctions.php on line 464 Sep 16 20:07:29 10.0.2.193 apache2[26511]: PHP Warning: socket_sendto() [<a href='function.socket-sendto'>function.socket-sendto</a>]: unable to write to socket [90]: Message too long in /home/wikipedia/common/php-1.17-test/includes/GlobalFunctions.php on line 464 Comment: Yes, just use 65507 (minus one). I don't know of any way to get that number from configuration. In theory you could use min( 65507, socket_get_option( $sock, SOL_SOCKET, SO_SNDBUF ) ) but it may break on OSs other than Linux, so I don't think it's worth doing. Another option is to suppress warnings while calling socket_sendto() and then to use socket_last_error(). _______________________________________________ MediaWiki-CodeReview mailing list mediawiki-coderev...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview