Vichuploaderbundle: FIleException -> RuntimeException

Created on 8 Jul 2017  路  2Comments  路  Source: dustin10/VichUploaderBundle

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

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)

server_log:
    type: server_log
    process_psr_3_messages: false
    host: 127.0.0.1:9911

Commenting this block might help with resolving this.

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NicolaPez picture NicolaPez  路  6Comments

Propscode picture Propscode  路  4Comments

webkmua picture webkmua  路  4Comments

ngilain picture ngilain  路  5Comments

nobady90 picture nobady90  路  3Comments