Thanks to visit codestin.com
Credit goes to github.com

Skip to content

failed to open stream: Resource temporarily unavailable #23097

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

Closed
sergioatzori opened this issue Jun 7, 2017 · 11 comments
Closed

failed to open stream: Resource temporarily unavailable #23097

sergioatzori opened this issue Jun 7, 2017 · 11 comments

Comments

@sergioatzori
Copy link

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.4.0-DEV

I'm experiencing this since 3.3. When I run my Behat tests, randomly happens to get this error that stops behat:

[Symfony\Component\Debug\Exception\ContextErrorException]                                                                                                                                        
 Warning: file_put_contents(/home/xxxx/CORE/var/cache/api-backoffice/bdd/appBddDebugProjectContainerDeprecations.log): failed to open stream: Resource temporarily unavailable 

I've no memory limits set in php for cli:

$ php --version
PHP 7.0.19-1~dotdeb+8.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.19-1~dotdeb+8.1, Copyright (c) 1999-2017, by Zend Technologies
$ cat /etc/php/7.0/cli/php.ini |grep memory_limit 
memory_limit = -1

This never happens when I call api's endpoint outside behat.

@sergioatzori
Copy link
Author

Some progress: the problem is gone by disabling the profiler collector on my behat environment.
So the problem seems in the profiler.
With this workaround I can successfully run my behat tests, but I cannot debug my code using profiler...
Furthermore I did a strace with collector turned on, and I can see that it's full of EAGAIN:

$ cat strace-CORE-behat_collect-active.txt |grep "EAGAIN"
read(10, 0x55cb8eba1e60, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(10, 0x55cb8eba1e63, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(12, 0x55cb8ebc2470, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(12, 0x55cb8ebc2473, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(14, 0x55cb8ebd4ea0, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(14, 0x55cb8ebd4ea3, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(16, 0x55cb8ebdcff0, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(16, 0x55cb8ebdcff3, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(18, 0x55cb8ecf9a60, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(18, 0x55cb8ecf9a63, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(20, 0x55cb8ed1e360, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(20, 0x55cb8ed1e363, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(22, 0x55cb8ed526e0, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(22, 0x55cb8ed526e3, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(24, 0x55cb8ed846c0, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(24, 0x55cb8ed846c3, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(26, 0x55cb8edab920, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(26, 0x55cb8edab923, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(28, 0x55cb8ede5b30, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(28, 0x55cb8ede5b33, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(29, 0x55cb8ede5b30, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(29, 0x55cb8ede5b33, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(31, 0x55cb8ee2d8f0, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(31, 0x55cb8ee2d8f3, 5)             = -1 EAGAIN (Resource temporarily unavailable)
read(33, 0x55cb8ee5e840, 7)             = -1 EAGAIN (Resource temporarily unavailable)
read(33, 0x55cb8ee5e843, 5)             = -1 EAGAIN (Resource temporarily unavailable)
open("/home/xxxxxxx/CORE/var/cache/api-backoffice/bdd/appBddDebugProjectContainerDeprecations.log", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EAGAIN (Resource temporarily unavailable)

I hope this can help addressing this issue.

@javiereguiluz
Copy link
Member

@sergioatzori in #23465 we made a lot of optimizations for the profiler data. Could you please try that and see if things have improved? Thanks!

@sergioatzori
Copy link
Author

After a "composer update" over 3.4.x-dev the issue is still here...:-(
Could you can give me some advice to inspect this problem?

@nicolas-grekas
Copy link
Member

Are you running on a native Debian or a VM/container? If not native, what is the host OS?

@sergioatzori
Copy link
Author

Debian on VM. I don't know host's OS because this is a cloud instance (OVH public cloud).

@nicolas-grekas
Copy link
Member

Still experiencing this? Dumping the container changed a lot since July.

@sergioatzori
Copy link
Author

sergioatzori commented Dec 6, 2017

After updating my whole project to stable 3.4.1 the problem is still there :-(
My composer.json is taken from symfony standard edition except for php version (I've 7.0.*).
I cannot run my behat tests with collector active, this is really annoying...

EDIT: Maybe OVH is throttling my disk I/O causing this? After updating to stable 3.4.1 all behat tests run slightly faster than before.

@fabpot
Copy link
Member

fabpot commented May 30, 2018

I'm going to close this issue as nobody else reported similar issues and unfortunately, we cannot do anything without being able to reproduce it ourselves.

@fabpot fabpot closed this as completed May 30, 2018
@sergioatzori
Copy link
Author

Hello Fabien, I've updated Symfony to 3.4.11: this fixed the issue.
I can confirm that behat tests (with collector active) are now faster.
Thank you

@mola93
Copy link

mola93 commented Sep 16, 2019

Deleting your log file (appBddDebugProjectContainerDeprecations.log) will fix the issue.

@mitchelstarc101
Copy link

still facing same error https://prnt.sc/jXuuY2j2A-vs while installing create directory of magento coding standard in windows10

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

No branches or pull requests

8 participants