Skip to content
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

Symfony Intl Memory Leak #3926

Closed
4oo4 opened this issue Apr 13, 2019 · 8 comments

Comments

Projects
None yet
5 participants
@4oo4
Copy link

commented Apr 13, 2019

Issue details

Yesterday my PHP got upgraded to package version 7.2.17-1+ubuntu16.04.1+deb.sury.org+3, and today I started getting Out of Memory issues randomly when adding certain articles. After doing some research, it looks to be related to Symfony Intl (oerdnj/deb.sury.org#1142) causing a memory leak. I was able to fix it on mine by upgrading /vendor/symfony/symfony/src/Symfony/Component/Intl to 3.4.24, though not sure if that will cause other issues.

I know that a migration to Symfony 3.4 was being worked on (I believe for Wallabag 2.4), so I'm guessing that will probably be the root fix for it.

Environment

  • wallabag version (or git revision) that exhibits the issue: 2.3.7
  • How did you install wallabag? Via git clone or by downloading the package? git clone
  • Last wallabag version that did not exhibit the issue (if applicable): NA
  • php version: 7.2.17-1+ubuntu16.04.1+deb.sury.org+3
  • OS: Ubuntu 16.04
  • type of hosting (shared or dedicated): Dedicated
  • which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL): MySQL

Steps to reproduce/test case

Upgrade PHP packages to 7.2.17-1+ubuntu16.04.1+deb.sury.org+3 (I also tested with the latest PHP 7.3 released at the same time and got the same result, not sure about 7.0 or 7.1), and try to add articles. Most of them will fail and cause Apache or PHP-FPM to have 100% CPU usage, and then eventually time out. These two articles would reliably trigger it for me:

Logs:

[2019-04-13 12:07:30] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\OutOfMemoryException: "Error: Allowed memory size of 3221225472 bytes exhausted (tried to allocate 2147483656 bytes)" at /var/www/html/wallabag/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php line 134 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\OutOfMemoryException(code: 0): Error: Allowed memory size of 3221225472 bytes exhausted (tried to allocate 2147483656 bytes) at /var/www/html/wallabag/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php:134)"} []```
@j0k3r

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

Thanks for that issue (and your research).
wallabag 2.4 will use Symfony 3.4 (see here). I'll let your issue open until 2.4 is released so people with the same issue might easily found it.

@j0k3r j0k3r added this to the 2.4.0 milestone Apr 15, 2019

@sztanpet

This comment has been minimized.

Copy link

commented Apr 29, 2019

Is this the same issue that causes this, or should I open a new issue?

[2019-04-29 15:53:11] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Error: Maximum execution time of 30 seconds exceeded" at /home/sztanpet/wallabag/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php line 126 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Error: Maximum execution time of 30 seconds exceeded at /home/sztanpet/wallabag/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php:126)"} []

Thanks!

@4oo4

This comment has been minimized.

Copy link
Author

commented Apr 29, 2019

@sztanpet Yeah, I think so, I saw BundleEntryReader.php in my debug logs too.

@binarydad

This comment has been minimized.

Copy link

commented May 11, 2019

Is there a workaround for this? Noticed all my recently added articles dont actually show (though the clients said they were added)

@4oo4

This comment has been minimized.

Copy link
Author

commented May 12, 2019

@binarydad Yeah, you can manually upgrade just the Intl part of Symfony and get it to work again.

git clone https://github.com/symfony/intl
cd intl
git checkout v3.4.24
mv /wallabag/vendor/symfony/symfony/src/Symfony/Component/Intl /wallabag/vendor/symfony/symfony/src/Symfony/Component/Intl.bak
mkdir -p /wallabag/vendor/symfony/symfony/src/Symfony/Component/Intl
cp -r * /wallabag/vendor/symfony/symfony/src/Symfony/Component/Intl
chown -R www-data:www-data /wallabag/vendor/symfony/symfony/src/Symfony/Component/Intl
sudo -u www-data php /wallabag/bin/console cache:clear --env=prod 
@Paulikid

This comment has been minimized.

Copy link

commented May 12, 2019

@4oo4 Thank you very much, works like a charm!

@j0k3r

This comment has been minimized.

Copy link
Member

commented May 13, 2019

☝️that'll be fixed in the upcoming 2.3.8 (coming this week).
Thanks all for the report 👏

@j0k3r j0k3r modified the milestones: 2.4.0, 2.3.8 May 13, 2019

@j0k3r

This comment has been minimized.

Copy link
Member

commented May 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.