View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002106 | Xdebug | Code Coverage | public | 2022-07-27 08:23 | 2022-08-09 17:35 |
Reporter | netdjw | Assigned To | |||
Priority | normal | Severity | crash | Reproducibility | always |
Status | new | Resolution | open | ||
OS | Alpine Linux in Docker | ||||
Product Version | 3.1.5 | ||||
Summary | 0002106: phpunit runs out of memory & runs much more slower than without xdebug | ||||
Description | In my Laravel project I have 1349 tests. I try to run phpunit in a Docker container. Some test are failing, but it's not a problem. When I start phpunit with this command:
Then I get this output:
The I tried to run phpunit without xdebug. In this case it can run all tests and create an error & fail reports as it should be. I tried to run phpunit pcov instead of xdebug, it can run also without die. When I run phpunit without --coverage-html option, it't runs smoothly. But with this option it start tests and new dots showing slowly and slowly and then stops showing new dots. But the processor usage grow up to 100%, memory usage also growing up to 100%, then swap is runs out, and then the container dies. Based on this test cases I think the problem is with xdebug. Here is my phpunit.dockerfile:
Is there any option to tell phpunit the maximum usable memory size or something other trick to avoid this issue? | ||||
Additional Information | PHP version 8.1.6 | ||||
Tags | alpine, coverage, crash, Docker, fpm, php8.1 | ||||
Operating System | |||||
PHP Version | 8.1.0-8.1.4 | ||||
|
Yes, that is easy. Dont set the memory limit to -1 as you've done with this docker config line:
But in general, I expect the code to run about 10-20 times as slow, and using a lot more memory. Are you should have you have enough and your machine didn't start swapping? |
|
@j-hotlink I think your issue is unrelated, can you create a new one — and include a way for me to reproduce this fully. I'll mark your comment as private in here. |
|
I tried to remove that line, but then docker died after filled every available memory space. RAM and swap too. So noting difference. |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-07-27 08:23 | netdjw | New Issue | |
2022-07-27 08:23 | netdjw | Tag Attached: alpine | |
2022-07-27 08:23 | netdjw | Tag Attached: coverage | |
2022-07-27 08:23 | netdjw | Tag Attached: crash | |
2022-07-27 08:23 | netdjw | Tag Attached: Docker | |
2022-07-27 08:23 | netdjw | Tag Attached: fpm | |
2022-07-27 08:23 | netdjw | Tag Attached: php8.1 | |
2022-08-09 09:58 | derick | Note Added: 0006352 | |
2022-08-09 09:59 | derick | Note Added: 0006353 | |
2022-08-09 13:57 | netdjw | Note Added: 0006356 |