-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
LDAP sync cronjob PHP error allocated memory exceeded #12018
Comments
Small update on this. It seems that the LDAP_MEM_LIM from .env is not replicated to the LDap_Sync.php console command. After hard coding 1024M into LDAP_Sync.php the error dissappears. So I assume it's some kind of Bug. |
small push on this issue. my hardcoded changes to the php file will be overwritten with every SNipe IT Upgrade. |
Sorry for not answering this sooner. Honestly, I have no idea. If it fixes it, just run those clear scripts right after you use the sync. |
No worries. A while ago I implemented the clear scripts into the script and they run on each script execution now. This seems to be a workaround for me. We can close this. :) |
Hi, could you maybe share the script? |
https://snipe-it.readme.io/docs/common-issues#quick-tip-handy-commands
|
Debug mode
Describe the bug
Hello there,
I created a script which runs on a daily bases as cronjob and syncs LDAP users to our 5 Locations in Snipe IT.
After the cronjob runs a few days, it then turns out to run into a php error 255 because PHP allocated memory is exceeded.
I checked my env and increased LDAP_MEM_LIM to 1024 already. After a few days: same error.
I also increased memory limit in php.ini without success.
What seems to be working is to run the
php artisan cache;clear
php artisan config:cache
commands which then leads to a functioning script again. Any ideas why this issue could appear and how to solve it?
Cheers
Reproduction steps
1.create crojob that runs daily to sync ldap users
2.wait until it runs 2-3 times
3.issue appears
Expected behavior
cronjob should run without issues on a daily basis
Screenshots
No response
Snipe-IT Version
6.0.12
Operating System
Rocky Linux 8
Web Server
nginx
PHP Version
8.0.24
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
Rocky Linux 8 was installed fresh and is only used to serve Snipe IT application. I'm running it on nginx with php-fpm.
Installation was done via git.
The text was updated successfully, but these errors were encountered: