504 Error TNG and Synology

geraldomeier
Posts: 1
Joined: Fri Apr 08, 2022 6:58 am

504 Error TNG and Synology

Post by geraldomeier »

I am running TNG on a Synology DS1621+ / 32GB Ram with DSM 7.1 with PHP 7.4 and Apache 2.4 and everything runs fine since years so far. I am very happy with it. But there is couple annoying little things: a) When users run a family relation calculation, and no connection between two persons is found, then TNG sits there for about 60 Seconds, and then (Synology) comes back with an gateway error (504), since Synology seems to time out before TNG. Then the users are lost. This error should be handled earlier and the user should be led back to a given page. b) when importing GEDCOM files, there is no progress bar seen on the screen, and the admin has to hit the "progress" button after a few minutes, to finish up. Then the green bar comes up immediately, and everything is fine. If pressing "progress" too early, one has to press it again, until the process finishes. Both of these little issues may have to do with the gateway timeout setting of the synology OS (i.e. 60 secs.) , but I have not found a setting where i could change that permanently in the Synology environment, to let Synology wait, until TNG times out and handles the error correctly. Are there any solutions which I could try? Thank You.
Steve
Posts: 131
Joined: Sun Oct 01, 2017 3:08 pm

Re: 504 Error TNG and Synology

Post by Steve »

What version of TNG are you using? Older versions of TNG can have problems with the newer versions of PHP due to changes in commands and variable declarations. Darrin is constantly upgrading TNG to keep up with OS updates.

TNG limits relationship calculations to 15 generations. I am running TNG v13.1.1 and have over 180,000 people in my database and do not have this error. However, the calendar or dates and anniversaries produces a 504 error because the query on so many people and dates times out. I do not know of or have a fix for this.

Since I too have a Synology, I run a local version of TNG for imports using NGINX instead of Apache. This avoids the 504 timeout error plus the progress bar works fine. According to Darrin, using a local version of TNG for imports does not conflict with the licensing agreement.
To use a second install of TNG, check this post: GEDCOM Import/Export 504 Error on Synology NAS
Paul Barrett
Posts: 72
Joined: Sun Apr 08, 2018 6:52 pm

Re: 504 Error TNG and Synology

Post by Paul Barrett »

I had the same issue with importing and also exporting large GEEDCOMs. I changed the backend to NGINX and they worked fine

So is there any reason to not simply change the backend server to NGINX on all TNG/DSM instances?
Steve
Posts: 131
Joined: Sun Oct 01, 2017 3:08 pm

Re: 504 Error TNG and Synology

Post by Steve »

You can use NGINX for TNG without issues. I use Apache due to changing the tree ID. It is much easier to create URL rewrite rules with Apache than NGINX. If I were I not using WordPress with TNG, I would use NGINX as well.
Paul Barrett
Posts: 72
Joined: Sun Apr 08, 2018 6:52 pm

Re: 504 Error TNG and Synology

Post by Paul Barrett »

Cool. Thanks.

The benefit of a functioning progress bar when you're importing trees of 20K people is well worth it, as well as banishing the 504's

NGINX it is.