Multiplying php processes

It was very hard to debug it, I thought that it's local dev server problem but I catch it at last

1. Win 10 Pro LTSC

2. PhpStorm  2023.1

Local server works, non php project opened and no problem at all  The problem starts when I swich to Magento 2 project, not depend of PHP version, 7.2,  7.4, the same. php + cmd processes multiplying like the virus. Sometimes I can catch this moment and use “taskkill /f /t /im php.exe”, sometimes not and 90+ of RAM used and terrible freezes.

Generally everything can work ok and then suddenly starts. 3 times killed processes, reload Storm and 15 minutes everything is Ok now but temporary anyway. 

UPD, was finishing the message switched to non php project and back. Multiplying started again, taskkill /f /t /im php.exe, looks like quiet now

1
37 comments

It's been fixed in 2023.2.1: WI-73645
Please update your IDE installation. Alternatively, you can disable Settings | PHP | Composer | Check for available package updates.

0

Turned off all checkboxes, no success. I imported 2023 setting to the old 2020, the problems appeared there too and that just happened on Magento projects

0

Up: killed php processes 5-7 times and looks like quit now. Looks like waiting for something

0

Up: and stated again (

0

Up: 5-7 process kills, 20 min pause, started again, that's terrible

0

Import old settings, turned off as you told before,  on old version set remote (non existent) interpreter? look like ok now

0

No, today started again, absolutely not available to work. I upgraded today to the last version, the same. Im Storm user for the many years and was no any such problems before. Need the help!!! I just want to turn off this

 

0

Please add #com.jetbrains.php and #com.intellij.execution.configurations.GeneralCommandLine to Help | Diagnostic Tools | Debug Log Settings, restart PhpStorm, open one of the affected projects, wait until the processes our spawned, and then share the (Help | Collect Logs and Diagnostic Data) via our uploading service: https://uploads.services.jetbrains.com/

0

It's clear how to collect and add, but not too clear what is “#com.jetbrains.php and #com.intellij.execution.configurations.GeneralCommandLine” that I need to  add to debug form in Help

 

What about the log I catch it immediately in the moment of spawn, waiting toi upload

0

but not too clear what is “#com.jetbrains.php and #com.intellij.execution.configurations.GeneralCommandLine” that I need to add to debug form in Help

Please open the Help | Diagnostic Tools | Debug Log Settings menu entry, there will be a dialog with a text field.
Then, please paste #com.jetbrains.php and #com.intellij.execution.configurations.GeneralCommandLine there on separate lines and click OK.

After that, reproduce the issue and share the (Help | Collect Logs and Diagnostic Data).

Thank you!

0

Thank you for the answer!

Upload id: 2023_11_07_26BNBYyAC3DCjAw4VHChPC (file: phpstorm-logs-20231107-1258489761243768010701359.zip)

0

So, it's definitely caused by checking for package updates:

C:\ProgramData\ComposerSetup\bin\composer.bat, update, --dry-run, --no-interaction, --no-ansi

What I don't understand is why it checks for updates even when the checkbox is disabled. Could you please confirm that the checkbox state hasn't been reset?

0

OMG, checked once more as you asked. Checkbox was turned on again. May be that happened when I removed project and recreated it. I tired to watch for activity about the day. Watch, turn on, multipling, turn off, kill via batch. Looks like stable now. This is my setup in all project now., is it optimal? I'll left taskmanager in background for several days for monotoring  in background anyway. Hope that this crazy problem is solved. Thant you for your time.!You helped me a lot

0

This is my setup in all project now., is it optimal?

Yes, looking good.

I'll left taskmanager in background for several days for monotoring in background anyway. Hope that this crazy problem is solved.

Please let me know if the checkbox state gets reset again for this project; I have an idea why it might happen.

0

Yes, sure, I'll be in touch and will post you about some available events. That was the great headache for me, so I'll not forget, Thank you again for your time, you helped me a lot! )

0

Appeared anyway and eat all my memory. Watched about this last three days to be sure

0

Could you please upload a new set of logs? I want to check if it's doing the same thing again.

0

Done during the process, I killed the phps after saving the file, #com.jetbrains.php and #com.intellij.execution.configurations.GeneralCommandLine were entered. BTW, killed the processes one time for now after the save and everything is quiet now.

Upload id: 2023_11_16_o2GDJvActLyx1hFvDnLRBZ (file: phpstorm-logs-20231116-19315713583966163223710208.zip)

0

There are some weird file system exceptions. Could you please clarify what this F:\ drive is?

0

Win10 Pro LTSC, NTFS, 1Tb SSD, 50% free

0

Honestly, I don't know. This time, we only start the most basic commands like this one:
Building process with commands: [C:\ProgramData\ComposerSetup\bin\composer.bat, show, --format=json, -a, --name-only]

It's not clear why PHP processes hang indefinitely when it happens.

When you see this again, could you please open the idea.log file yourself (Help | Show Log in Explorer), check what command we ran, and try running it manually in CMD? You'll need to remove separating the command-line options.

0

I ran C:\ProgramData\ComposerSetup\bin\composer.bat, show, --format=json, -a, --name-only in the project folder and got

The "magento/magento-composer-installer"
"2.3.0"). You may need to run composer u
The "magento/inventory-composer-installe
("2.3.0"). You may need to run composer
                                       
 Command "," is not defined.           

Got infinity  loop with no commas


                                       

0

Command "," is not defined.

Yep, that's why I wrote that you'll have to remove the separators.

Got infinity loop with no commas

And this is why you get hanging PHP processes. You need to find out why your Composer runs in a loop. Perhaps a Composer plugin or something?

0

Ok, great, what should be the std behavior for the non-commas “C:\ProgramData\ComposerSetup\bin\composer.bat, show, --format=json, -a, --name-only”?

I have php command tool plugin in Storm also, may be the problem is there?

I can reinstall the Composer. Not too clear what result should I reach

0

Generally I need the basic idea to move forward. BTW, no such problem on WSL2

0

Ok, great, what should be the std behavior for the non-commas “C:\ProgramData\ComposerSetup\bin\composer.bat, show, --format=json, -a, --name-only”?

For me on a random project, it runs for a while (10-20 seconds), and then ends with last packages starting with z.

I have php command tool plugin in Storm also, may be the problem is there?

If I get it right, you should get the same kind of issue even if you close PhpStorm and run the command in a CMD window.

I can reinstall the Composer. Not too clear what result should I reach

The command should stop running at some point; it shouldn't run in an infinite loop.

1

Ok, reporting:

1. Windows CLI without commas: I gave you the wrong information, it's a too long process, not infinity. It stopped after 3 minutes on z letter

2. Storm: the processes started to multiply, took about 90 of 64Gb memory percents. I turned off the Storm and it's continue to stay in this stage till reboot. I was waiting for some chages about 15-20 minutes

 

0

Maybe it's Xdebug that makes everything slow?
Could you please disable Xdebug completely for the PHP interpreter in %PATH% (make sure you don't have Xdebug mentioned in php -v) and check if the isssue persists.

0

I haven't it, but checked anyway. No Xdebug in my setup. Checked the path also to be sure

0

Could you please edit your composer.bat file and add the --no-plugins option there? The line should look like this: php "%~dp0composer.phar" --no-plugins %*

Would that make the issue go?

0

Please sign in to leave a comment.