johannes0910
johannes0910
DDokploy
Created by johannes0910 on 11/7/2024 in #help
Regular "Gateway Timeout" errors from Mattermost / Traefik
ok I switched the network to dokploy yesterday. And the machine ran through. So while creating another network works, in principle, it's too unreliable. Thanks for the help!
10 replies
DDokploy
Created by johannes0910 on 11/7/2024 in #help
Regular "Gateway Timeout" errors from Mattermost / Traefik
this is the docker inspect of the mattermost image: https://pastecode.io/s/z4iik55m Gateway Timeout on public domain, works via terminal on localhost. Traefik Log
{"ClientAddr":"XXXXX:9809","ClientHost":"XXXXX","ClientPort":"9809","ClientUsername":"-","DownstreamContentSize":15,"**DownstreamStatus":504,**"Duration":30001269707,"OriginContentSize":15,"OriginDuration":30001013701,"OriginStatus":504,"Overhead":256006,"RequestAddr":"mattermost.MYDOMAIN","RequestContentSize":0,"RequestCount":4820,"RequestHost":"mattermost.MYDOMAIN","RequestMethod":"GET","RequestPath":"/api/v4/websocket?connection_id=ie8djs8zwbbnmq8m7t47j8oo9e\u0026sequence_number=11\u0026posted_ack=true","RequestPort":"-","RequestProtocol":"HTTP/1.1","RequestScheme":"https","RetryAttempts":0,"RouterName":"mattermost-mattermost-cbe7d3-9-websecure@docker","ServiceAddr":"172.20.0.3:8065","ServiceName":"mattermost-mattermost-cbe7d3-9-websecure@docker","ServiceURL":"http://172.20.0.3:8065","StartLocal":"2024-11-07T15:37:19.181109825Z","StartUTC":"2024-11-07T15:37:19.181109825Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","entryPointName":"websecure","level":"info","msg":"","time":"2024-11-07T15:37:49Z"}
{"ClientAddr":"XXXXX:9809","ClientHost":"XXXXX","ClientPort":"9809","ClientUsername":"-","DownstreamContentSize":15,"**DownstreamStatus":504,**"Duration":30001269707,"OriginContentSize":15,"OriginDuration":30001013701,"OriginStatus":504,"Overhead":256006,"RequestAddr":"mattermost.MYDOMAIN","RequestContentSize":0,"RequestCount":4820,"RequestHost":"mattermost.MYDOMAIN","RequestMethod":"GET","RequestPath":"/api/v4/websocket?connection_id=ie8djs8zwbbnmq8m7t47j8oo9e\u0026sequence_number=11\u0026posted_ack=true","RequestPort":"-","RequestProtocol":"HTTP/1.1","RequestScheme":"https","RetryAttempts":0,"RouterName":"mattermost-mattermost-cbe7d3-9-websecure@docker","ServiceAddr":"172.20.0.3:8065","ServiceName":"mattermost-mattermost-cbe7d3-9-websecure@docker","ServiceURL":"http://172.20.0.3:8065","StartLocal":"2024-11-07T15:37:19.181109825Z","StartUTC":"2024-11-07T15:37:19.181109825Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","entryPointName":"websecure","level":"info","msg":"","time":"2024-11-07T15:37:49Z"}
10 replies
DDokploy
Created by johannes0910 on 11/7/2024 in #help
Regular "Gateway Timeout" errors from Mattermost / Traefik
aaaand now it's gone again, not coing up. So it wasn't the docker cache. See the above docker-compose file. I had to create an app-network (for some reason) to get it work
10 replies
DDokploy
Created by johannes0910 on 11/7/2024 in #help
Regular "Gateway Timeout" errors from Mattermost / Traefik
After a system reboot mattermost requests to the public domain failed with 504. While the terminal & curl to localhost worked fine and there were no apparant errors. Redeploying and rebuilding didn't help. I then did server, space, clean all (in Dokploy). The machine became available and has been running fine for 30 minutes now.
10 replies
DDokploy
Created by johannes0910 on 11/7/2024 in #help
Regular "Gateway Timeout" errors from Mattermost / Traefik
all other containers work fine, so it's just Mattermost having issues. I'm at the latest dokploy version, a system restart did not help
10 replies
DDokploy
Created by johannes0910 on 11/7/2024 in #help
Regular "Gateway Timeout" errors from Mattermost / Traefik
The last uptime checks ... lots of short downtimes
Up 2024-11-07 12:42:45 200 - OK
Down 2024-11-07 12:41:15 Request failed with status code 504
Up 2024-11-07 12:35:15 200 - OK
Down 2024-11-07 12:33:45 Request failed with status code 504
Up 2024-11-07 12:30:37 200 - OK
Down 2024-11-07 12:29:07 Request failed with status code 504
Up 2024-11-07 12:25:07 200 - OK
Down 2024-11-07 12:23:37 Request failed with status code 504
Up 2024-11-07 12:14:36 200 - OK
Down 2024-11-07 12:13:06 Request failed with status code 504
Up 2024-11-07 12:42:45 200 - OK
Down 2024-11-07 12:41:15 Request failed with status code 504
Up 2024-11-07 12:35:15 200 - OK
Down 2024-11-07 12:33:45 Request failed with status code 504
Up 2024-11-07 12:30:37 200 - OK
Down 2024-11-07 12:29:07 Request failed with status code 504
Up 2024-11-07 12:25:07 200 - OK
Down 2024-11-07 12:23:37 Request failed with status code 504
Up 2024-11-07 12:14:36 200 - OK
Down 2024-11-07 12:13:06 Request failed with status code 504
10 replies
DDokploy
Created by johannes0910 on 11/7/2024 in #help
Regular "Gateway Timeout" errors from Mattermost / Traefik
This is the (standard) docker-compose I use to set it up:
# https://docs.docker.com/compose/environment-variables/

version: "2.4"

services:
postgres:
image: postgres:${POSTGRES_IMAGE_TAG}
restart: always
security_opt:
- no-new-privileges:true
#pids_limit: 100
read_only: true
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data
environment:
# timezone inside container
- TZ

# necessary Postgres options/variables
- POSTGRES_USER:mmuser
- POSTGRES_PASSWORD:mmuser_password
- POSTGRES_DB:mattermost
networks:
- app-network

mattermost:
depends_on:
- postgres
image: mattermost/${MATTERMOST_IMAGE}:${MATTERMOST_IMAGE_TAG}
restart: always
security_opt:
- no-new-privileges:true
#pids_limit: 200
read_only: ${MATTERMOST_CONTAINER_READONLY}
tmpfs:
- /tmp
volumes:
- ${MATTERMOST_CONFIG_PATH}:/mattermost/config:rw
- ${MATTERMOST_DATA_PATH}:/mattermost/data:rw
- ${MATTERMOST_LOGS_PATH}:/mattermost/logs:rw
- ${MATTERMOST_PLUGINS_PATH}:/mattermost/plugins:rw
- ${MATTERMOST_CLIENT_PLUGINS_PATH}:/mattermost/client/plugins:rw
- ${MATTERMOST_BLEVE_INDEXES_PATH}:/mattermost/bleve-indexes:rw


environment:
# timezone inside container
- TZ

options/variables (see env.example)
- MM_SQLSETTINGS_DRIVERNAME
- MM_SQLSETTINGS_DATASOURCE


- MM_BLEVESETTINGS_INDEXDIR


- MM_SERVICESETTINGS_SITEURL
networks:
- app-network

networks:
app-network:
driver: bridge
# https://docs.docker.com/compose/environment-variables/

version: "2.4"

services:
postgres:
image: postgres:${POSTGRES_IMAGE_TAG}
restart: always
security_opt:
- no-new-privileges:true
#pids_limit: 100
read_only: true
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data
environment:
# timezone inside container
- TZ

# necessary Postgres options/variables
- POSTGRES_USER:mmuser
- POSTGRES_PASSWORD:mmuser_password
- POSTGRES_DB:mattermost
networks:
- app-network

mattermost:
depends_on:
- postgres
image: mattermost/${MATTERMOST_IMAGE}:${MATTERMOST_IMAGE_TAG}
restart: always
security_opt:
- no-new-privileges:true
#pids_limit: 200
read_only: ${MATTERMOST_CONTAINER_READONLY}
tmpfs:
- /tmp
volumes:
- ${MATTERMOST_CONFIG_PATH}:/mattermost/config:rw
- ${MATTERMOST_DATA_PATH}:/mattermost/data:rw
- ${MATTERMOST_LOGS_PATH}:/mattermost/logs:rw
- ${MATTERMOST_PLUGINS_PATH}:/mattermost/plugins:rw
- ${MATTERMOST_CLIENT_PLUGINS_PATH}:/mattermost/client/plugins:rw
- ${MATTERMOST_BLEVE_INDEXES_PATH}:/mattermost/bleve-indexes:rw


environment:
# timezone inside container
- TZ

options/variables (see env.example)
- MM_SQLSETTINGS_DRIVERNAME
- MM_SQLSETTINGS_DATASOURCE


- MM_BLEVESETTINGS_INDEXDIR


- MM_SERVICESETTINGS_SITEURL
networks:
- app-network

networks:
app-network:
driver: bridge
10 replies
DDokploy
Created by max.d on 11/5/2024 in #help
Zero downtime possible
add a health check in the Dockerfile, that will solve your issues
10 replies
DDokploy
Created by johannes0910 on 11/5/2024 in #help
Impossible to start two deploys at once?
oho, and now the second docker image is confused. I cannot get a terminal:
Error response from daemon: Container cf0c5547e233457ef816c17f6e35ce94a09dca5e505dc5beb1c710847f71e773 is restarting, wait until the container is running
Error response from daemon: Container cf0c5547e233457ef816c17f6e35ce94a09dca5e505dc5beb1c710847f71e773 is restarting, wait until the container is running
The Logs section show the container as "restarting" as well.
docker logs <id>
docker logs <id>
shows me an error about unknown host in my proxy conf. OK my bad, why didn't it show the error in Dokploy? OK so I fixed my broken nginx.conf. Dokploy is still conused - not showing any logs or giving me a preciuos terminal. Both things work using CLI, so it's not Docker or my incompetence
2 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
it's really weird, the code now also fails with a normal Docker image on another VPS. So I don't think the issue is particularly related to Dokploy. I created an issue with a minimal sample at the Chrome wrapper lib that I'm using https://github.com/YusukeIwaki/puppeteer-ruby/issues/339
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
I have to set up a demo system for that, this will take some time
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
all I can say now is that my simple demo code outputs 10 warnings(?) like this: [1] ! reaped unknown child process pid=218 status=pid 218 exit 0
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
the Puma threads don't help me, because I don't fully grasp how things work internally. Rails usually works like magic... until it doesn't. Updating to Rails 8 was another thing I wanted to try - but then again, it works on my machine (tm)
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
it's a brand new Dokploy-online hetzner VPS
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
its https://mydomain/test basically. The app works fine.
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
Sample Code that works, in Dev:
def test1
url = "https://www.heise.de"
content = ExtractContent.new.fetch_content(url)

render :plain => content
end
def test1
url = "https://www.heise.de"
content = ExtractContent.new.fetch_content(url)

render :plain => content
end
` Very simple ... it fails / hangs on my VPS
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
yes. Controller Actions are HTTP Endpoints, such as /foo Alternatively I start a background job that gets processed in the same process as the webserver. Both fail in production on Dokploy
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
1) Working: - Dokploy terminal - bin/rails console - ExtractContent.new.fetch_content("https://www.google.com") 2) Not working: - The same ExtractContent.new.fetch_content called via a controller action or background job Both are running in the same container.
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
From the issue: "Dokploy doesn't do anything than just building the image and running in to a container, so is basically the same thing you run the commands manually in your server, but dokploy automatize that process" That's what I assume too and that's why I don't understand why it doesn't work. It doesn't help me though. My server has 16gb ram and lots of cores. It's not a resource issue. Besides, it works in rails console???
38 replies
DDokploy
Created by johannes0910 on 10/27/2024 in #help
Headless Chrome Timing Out on Dokploy Deployment
apart from some volumes, no it's all default
38 replies