Any ideas why this happens to certain pages? It was working earlier this afternoon. I tried accessing said page just now and I'm unable to and getting this error: 504 Gateway Time-out
Announcement
Collapse
No announcement yet.
504 Gateway Time-out
Collapse
X
-
The only reason that should occur is if the page in question is attempting to do something that takes an extremely long amount of time (60+ seconds) and has still not returned a valid response. This can occur when a coding error has been made in a page template, resulting in an infinite loop, but if it began without changes, that sometimes indicates the page in question is calling out to some third party service that has become unavailable. For example, if a store's pages are calling to a shipping gateway on every page request, this is not only bad for performance, but if the shipping gateway is down, it can cause pages to hang. It would probably need debugging on the affected pages.
-
Originally posted by ILoveHostasaurus View PostThe only reason that should occur is if the page in question is attempting to do something that takes an extremely long amount of time (60+ seconds) and has still not returned a valid response. This can occur when a coding error has been made in a page template, resulting in an infinite loop, but if it began without changes, that sometimes indicates the page in question is calling out to some third party service that has become unavailable. For example, if a store's pages are calling to a shipping gateway on every page request, this is not only bad for performance, but if the shipping gateway is down, it can cause pages to hang. It would probably need debugging on the affected pages.Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Thank you for the responses. Today the page in question loaded. And just now, I got a 504 again. Quite odd. Just wondering if there is a Miva Templating Language validator akin to https://jsonlint.com/?
Comment
-
Originally posted by lesliekirk View Post
It can also happen when using a cloud service such as Cloudflare - but they have their own page for it (so you would know if it's them).
AMX8QL.pngLeslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Originally posted by pipette-dave View PostThank you for the responses. Today the page in question loaded. And just now, I got a 504 again. Quite odd. Just wondering if there is a Miva Templating Language validator akin to https://jsonlint.com/?
- 1 like
Comment
-
Originally posted by lesliekirk View Post
LOL, this just happened (while trying to delete expired baskets) Sorry, just had to share
Comment
-
We had that problem of 504 Gateway Time-out over the weekend (4 different computers, 2 different operating systems and also mobile devices) and the store was down for who knows how long... Sometimes things worked sort of but only sometimes.
Contacted Support and after a bit they decided to Pack Data Files and then things started working.
That solution didn't really make sense to me but "sometimes the databases get too big or have some corruption...".
Then I checked out our Scheduled Tasks because we had a task set up to pack data file every 7 days - and the Task was missing so I tried to add it back but packing data files is not offered as a task operation and I know it used to be there.
Contacted Support again and am informed that that option was removed in Miva 10 "because it was causing issues when ran taking some sites down in the middle of the night". Suggested to put a topic in Dream Features to get what was once a nice feature that was removed to be put back in.
So instead of finding and fixing the problem of packing data files with a task, Miva just removes the option.
Now somebody needs to be sure to manually pack data files once in a while.
If I see the 504 error again I will see if packing data files fixes it.
Comment
-
The pack data files is not a feature that will be put back into scheduled tasks. That procedure performs different operations depending on the type of underlying database a particular store is using, due to the fact that the Miva Merchant software supports multiple database types. The functions it performs on the most common database configurations are not safe to run unattended, which is why it was removed. The two specific problems are:- Stores with significant traffic, or extremely large record counts in tables normal shopper traffic interact with, should only have this run while the store is in maintenance mode because the optimization will potentially lock the table(s) in question while their indexes are rebuilt by the underlying database system, resulting in the appearance of a non-responsive site, and ultimately a gateway timeout.
- On certain underlying table and index types, there may be corruption that MySQL/MariaDB has allowed to occur, without realizing it. When the table/index optimization is performed, there are scenarios where this reveals the problem to the DBMS and it marks the table in question offline, taking the store offline with a fatal error until a manual repair is run. If this is done as an automated task, the store will remain offline until a human intervenes; if it is done by a human, it will be realized immediately, allowing a repair to be made immediately.
If a pack data files operation corrected an issue, there was an underlying database problem; I'd need to know the ticket/site/specifics to advise further.Last edited by ILoveHostasaurus; 03-25-21, 04:53 AM.
Comment
-
Thank you for all the input and information.
I'm not sure how helpful this might be, but I narrowed the error down to only a couple of pages and redid the content. Meaning, I copied the code from my Sublime Text file, pasted it into new page templates in admin. I deleted the old versions and now the pages loaded as they should. Perhaps there were code errors, or maybe the file became corrupted somehow? I don't know for sure. I do know that the two pages in question load properly now.
Comment
Comment