Closed martijnimhoff closed 5 years ago
Hi @martijnimhoff ,
This seems more like gitlab-runner thing.
You can change shm_size in your docker gitlab-runner setup.
shm_size = 300000
# in bytes
Can you verify if it solves your problem?
Let me know...
Thanks for your response, i've tried it with different sizes. The biggest size I tried was 2GB. Still some of my tests are failing. Also, the amount of failing tests does not change significantly.
try with 2GB (I added those two tests)
Tests: 118, Assertions: 354, Errors: 22.
Earlier test with lower shm_size.
Tests: 116, Assertions: 316, Errors: 24.
This is the output at the end of the tests: Time: 12.25 minutes, Memory: 48.00MB
Is this memory usage related to shm?
And is there a way to monitor the actual shm usage?
Update: Sorry I've been stupid. My runner was using the shared gitlab runner instead of our own runner... I'm closing the issue for now.
I currently have the same issue but when running dusk locally on my Ubuntu 19.04. Like described above, the first two tests pass and the error occurs for the rest of the tests. My /dev/shm is barely used and has 8GB. I am using the same chrome options.
invalid session id
(Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 5.0.10-surface-linux-surface x86_64) (Facebook\WebDriver\Exception\NoSuchDriverException)
Adding sleep(1)
to setUp
does not work either.
Any ideas?
@erksch Did you verified your gitlab-runner .toml as in https://github.com/laravel/dusk/issues/105#issuecomment-296411919 ?
Thanks for accepting my PR earlier on!
I'm running into the issue with my Gitlab runner that my tests are failing due to chrome not booting soon enough. This only happens when I run multiple tests in a row (30+). Usually the first few tests succeed and then the rest fails. This is with a testing setup in which I'm repeating the same simple test 100 times:
This is the error I'm getting.
I'm using these chrome options:
I found that adding a
sleep(1);
at the end of thesetUp()
inDuskTestCase.php
solves the issue, yet this increases the duration of tests significantly... I might have found a better solution, which is mounting the /dev/shm folder, however I'm not sure how to implement: https://github.com/elgalu/docker-selenium/issues/20Since adding this fix might increase stability for everyone using Laravel Dusk on a Gitlab CI, I posted this here. @chilio Would you know how to implement this fix?