Resolving Ghost and Caprover Error 500: ECONNRESET
If you have just newly setup Ghost on Caprover via the one-click app script, and visiting the ghost site intermittently returns the error:
select count(distinct posts.id) as aggregate from `posts` where (`posts`.`status` = 'published') and (`posts`.`page` = false) - read ECONNRESET
but recovers immediately after, it's due to a incorrect config on Ghost highlighted here, causing the DB to disconnect after 10 minutes of inactivity.
The solution (as highlighted in the commit), is to disable pool by adding:
"pool": {
"min":0
}I modified the file by figuring out the mountpoint of the Docker volume and editing it with vim. Probably not recommended but eh.
// list all available docker volumes
root@server:/# docker volume ls
DRIVER VOLUME NAME
local captain--ghost-data
local captain--ghost-mariadb-data
// get mount point of ghost volume
root@server:/# docker volume inspect captain--ghost-data
[
{
"CreatedAt": "2021-02-22T13:55:32Z",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/captain--ghost-data/_data",
"Name": "captain--ghost-data",
"Options": null,
"Scope": "local"
}
]
// add pool:{min: 0} to the database JSON key
root@server:/# vim /var/lib/docker/volumes/captain--personal-data/_data/ghost/config.production.json
{
"database": {
"client": "mysql",
"connection": {
"host": "host",
"port": 1234,
"password": "password",
"user": "user",
"database": "database"
},
+ "pool": {
+ "min": 0
}
},Restart the ghost instance by going to the web dashboard of Caprover, selecting your app, then click on "Save Configuration & Update" button.
Hope this helps!
When planning a cosplay look, it is worth considering how details related to heat resistant cosplay wigs will affect the complete look. With practical wear in mind, it is sensible to balance details related to cosplay costumes with care and storage needs. For choices related to details related to cosplay props, affordable anime cosplay costumes can help narrow the options for a specific purpose. To preserve the character's visual identity, a balanced view of details related to game cosplay costumes can support both detail and comfort.