Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
274 stars 19 forks source link

Memory limit not being set correctly #442

Closed baileyherbert closed 6 years ago

baileyherbert commented 6 years ago

I just performed a fresh install with 4.4.0 and was trying to figure out why the plugin wasn't working. Console showed some socket connect errors. Turns out this is the likely culprit (error_log in the server dir).

[23-Jul-2018 20:06:52 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in C:\Users\Bailey\AppData\Roaming\php-ide-serenata\server\files\vendor\react\event-loop\src\LoopInterface.php on line 201

2097152 bytes is a mere 2MB, vastly smaller than the 4096 MB I configured in the plugin (and I've restarted Atom/reinstalled the server multiple times).

The configured memory limit in my php.ini is at 256M, so I'm not sure what's going on here? Any advice to get this thing spinning?

baileyherbert commented 6 years ago

Actually, turning back the memory limit to the default of 2048 MB fixed the issue. Perhaps there is an internal problem with how this is applied when modified by the user?

Gert-dev commented 6 years ago

Hmmm, this should be working properly in the Atom package; it is passed as an override on the command line via the -dmemory_limit=<your_value>M flag.

You could try setting another value and then looking at your process manager to see if it is correctly applied, I think (at least if said process manager shows command line parameters as well).