Piped
Piped copied to clipboard
Self hosted docker - infrequent nginx error 5XX
Official Instance
- [ ] The bug is reproducible on the official hosted instance, or is API-related.
Describe the bug
Following official documentation for self hosted setup In the docker-compose nginx service showing error 5xx on piped-api endpoints after a day or two until restarted
To Reproduce
- I have done a self hosted setup following the official documentation
- after a 1-2 days running the nginx service showing error 5xx for almost any piped api address. /config or /feed for example.
In my setup i have a caddy as reverse proxy, but even bypassing that showed the issue remain.
Expected behavior
Not to break.
Logs/Errors
I couldn’t find any useful log or any sign in any related service
Browser, and OS with Version.
Safari/Opera on iOS Firefox/Edge on Fedora 41
Additional context
To mitigate the issue i have added to my reverse proxy with my own domain
networks:
default:
aliases:
- "papi.example.com"
Then added a healthcheck to the nginx service:
healthcheck:
test: "if [ 400 -eq $(curl -o /dev/null -sw '%{http_code}' https://papi.example.com/feed) ]; then exit 0;else kill 1;fi"
start_period: 2m
interval: 2m
For the last week this solution worked flawlessly , yet i am clueless what causing the nginx to lock up like this
You may want to check logs of your backend container by entering the directory of your compose file and running
docker compose logs piped
I have tried to correlate between nginx logs and piped backend logs however i only found this snippet so far other than the current IOS player issue tracked in other issue thread. Is there any way I could make the log more verbose? I couldn't find any mention of that in documentation or anywhere on piped-extractor main repo.
piped-backend | SLF4J: No SLF4J providers were found.
piped-backend | SLF4J: Defaulting to no-operation (NOP) logger implementation
piped-backend | SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
piped-backend | Feb 04, 2025 12:00:15 AM org.hibernate.Version logVersion
piped-backend | INFO: HHH000412: Hibernate ORM core version [WORKING]
piped-backend | Feb 04, 2025 12:00:16 AM org.hibernate.cache.internal.RegionFactoryInitiator initiateService
piped-backend | INFO: HHH000026: Second-level cache disabled
piped-backend | Feb 04, 2025 12:00:16 AM org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator initiateService
piped-backend | INFO: HHH000130: Instantiating explicit connection provider: org.hibernate.hikaricp.internal.HikariCPConnectionProvider
piped-backend | java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.asText()" because the return value of "com.fasterxml.jackson.databind.JsonNode.get(String)" is null
piped-backend | at me.kavin.piped.utils.obj.MatrixHelper.<clinit>(MatrixHelper.java:39)
piped-backend | at me.kavin.piped.Main.lambda$main$2(Main.java:90)
piped-backend | at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
piped-backend | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
piped-backend | at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)
piped-backend | Feb 04, 2025 12:00:16 AM org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl constructDialect
piped-backend | WARN: HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
piped-backend | Feb 04, 2025 12:00:17 AM org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator initiateService
piped-backend | INFO: HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
You can expose API server by adding ports to your compose file, then poke it with curl -v http://127.0.0.1:8081/trending?region=US:
piped:
image: 1337kavin/piped:latest
ports:
- "8081:8080"
You may need to remove the healthcheck and restart: unless-stopped, then let the service fail, so that the logs will stop at the moment it fails.
Make sure that your images are up to date by running docker compose pull then docker compose up -d --force-recreate.
I will try , however my whole issue is that the api has no issue. The nginx fails to connect to the api on the docker network periodically. Even though api never stopped.