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

Error 500 by Memory Limit (many rows on DB) #11

Open
jonaswebdev opened this issue May 29, 2020 · 2 comments
Open

Error 500 by Memory Limit (many rows on DB) #11

jonaswebdev opened this issue May 29, 2020 · 2 comments

Comments

@jonaswebdev
Copy link

Firstly, I loved this Meter app to monitoring my apps on simple way, congrats by the project :)

Back to focus, I installed today about 6 hours ago, but now I have issues.

When I enter on /meter, I got Error 500, checking Laravel logs I saw a problem related with memory limit, my previous limit was 128M and I updated to 256M but keeps the same problem:

[2020-05-29 03:08:06] production.ERROR: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) {"userId":1,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) at /var/vhosts/mydomain.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:127)

I checked the Meter DB table I saw something like more than 500Mb with almost 140k rows.

I ran the command to prune but didn't solve:
php artisan meter:prune
0 entries pruned.

So, I checked the prune command and it only deletes more than 1 day ago.

Finally, I truncate the meter DB table and Meter App back to works.

My question: do you have an idea what could I do to avoid this?

maybe I could prune with on less interval but I will lose analysis data, right?

Thanks in advance

@Taoshan98
Copy link

Same here, any solutions?

@4nkitd
Copy link
Contributor

4nkitd commented Dec 17, 2022

setup a daily backup to s3 or something else and clean table.

Suggested tool: https://github.com/4nkitd/backup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants