When I upload an image with an exceeded size (upload_max_filesize), I got the FileException that I handle via try / catch.
But there is another exception I cant manage, which is
(1/1)聽RuntimeException
--
stream_socket_sendto(): Broken pipe
--
in聽ServerLogHandler.php聽(line 57)
at聽stream_socket_sendto(resource, 'YTo3Ontz...xO319')in聽ServerLogHandler.php聽(line 57)
Its seems to happen only when the fileException occur.
How can I abord the upload to avoid the RuntimeException to occur ?
Thanks
Being ServerLogHandler outside this bundle, I can't see how we can help you here.
We were experiencing the exact same scenario. Important detail is that this happens in Symfony 3.3.
This only occurs when using the built-in Symfony Webserver. When running on a 'normal' LAMP-stack, this does not happen. It looks like a weird side-effect after they tried to speed up performance of the built-in server on Windows: https://github.com/symfony/symfony/issues/22712
Edit: Looking more into this, it seems to be the dev-environment that has this logging setup by default (see config_dev.yml)
server_log:
type: server_log
process_psr_3_messages: false
host: 127.0.0.1:9911
Commenting this block might help with resolving this.
Most helpful comment
We were experiencing the exact same scenario. Important detail is that this happens in Symfony 3.3.
This only occurs when using the built-in Symfony Webserver. When running on a 'normal' LAMP-stack, this does not happen. It looks like a weird side-effect after they tried to speed up performance of the built-in server on Windows: https://github.com/symfony/symfony/issues/22712
Edit: Looking more into this, it seems to be the dev-environment that has this logging setup by default (see config_dev.yml)
Commenting this block might help with resolving this.