-
Notifications
You must be signed in to change notification settings - Fork 46
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 after adding place #500
Comments
Can you please check the Web API logs? They will show an error if you encounter 500 in the frontend. |
This is right after successfully adding a place. I cannot edit nor add anything. Is this the log you were requesting? |
Yep. Please try adding |
( |
Thanks for your help. It worked, but only for 1 more database edit. Now I can add 2 places before getting the 500 error, and the same log traceback. |
Ok, something seems to be wrong either with your setup or with your database. I assume this is not the only object in your database? Have you ried running check & repair? |
I just tried to sync the database with gramps, run a check & repair (1 empty event has been deleted) and sync back the database to gramps web. The issue is still there. |
Please check if there is a lock file in the database directory and delete it manually. Not sure what is wrong there. |
I couldn't find any lock file in the database directory. I found the following error in the log
The docker compose file I use for configurationversion: "3.7"
services:
grampsweb: &grampsweb
image: ghcr.io/gramps-project/grampsweb:latest
restart: always
ports:
- "5000:5000" # host:docker
environment:
GRAMPSWEB_TREE: "Family tree" # will create a new tree if not exists
GRAMPSWEB_CELERY_CONFIG__broker_url: "redis://grampsweb_redis:6379/0"
GRAMPSWEB_CELERY_CONFIG__result_backend: "redis://grampsweb_redis:6379/0"
GRAMPSWEB_RATELIMIT_STORAGE_URI: redis://grampsweb_redis:6379/1
GRAMPSWEB_IGNORE_DB_LOCK: true
depends_on:
- grampsweb_redis
volumes:
- /volume1/docker/grampsweb/users:/app/users # persist user database
- gramps_index:/app/indexdir # persist search index
- gramps_thumb_cache:/app/thumbnail_cache # persist thumbnails
- gramps_cache:/app/cache # persist export and report caches
- gramps_secret:/app/secret # persist flask secret
- /volume1/docker/grampsweb/db:/root/.gramps/grampsdb # persist Gramps database
- /volume1/docker/grampsweb/media:/app/media # persist media files
- gramps_tmp:/tmp
grampsweb_celery:
<<: *grampsweb # YAML merge key copying the entire grampsweb service config
ports: []
container_name: grampsweb_celery
depends_on:
- grampsweb_redis
command: celery -A gramps_webapi.celery worker --loglevel=INFO
grampsweb_redis:
image: redis:alpine
container_name: grampsweb_redis
restart: always
volumes:
gramps_users:
gramps_index:
gramps_thumb_cache:
gramps_cache:
gramps_secret:
gramps_db:
gramps_media:
gramps_tmp: |
How much RAM does your server have? |
It has 20GB, shared with other dockers and apps. The memory usage of the whole system is about 40%. |
Ok it's an SQLite lock error, not a Gramps one, so there must be two processes trying to write simultaneously to the database. Are you accessing the database with anything else, e.g. syncing in parallel? Can you try manually unlocking the database using the command line? Perhaps there is some process that crashes before releasing the lock. |
I'm not accessing the database with another process. The only thing that access the file is a backup once a day. The backup does not access the database directly, it just copies the database file. |
Is this error still happening? If you can't confirm, I'll go ahead and close this issue. There have been improvements in v2.3.1 which might well have solved this. |
Hi, I tried with v2.3.1 and the error is still happening. The first write to the database after boot can complete successfully. The second and next ones are reporting an error 500 response to the HTTP put message. |
Thanks for checking |
After successfully adding a place, with name, type, enclosed place and lat-long coordinates, I get an error 500 for any api POST.
It works after a restart, but I can only create 1 place and then it's broken again.
My Gramps Web is installed in a docker container. This issue didn't come with the latest version, it was there before, but still there.
The text was updated successfully, but these errors were encountered: