In last week-two I’m facing critical issue with router pages.
All router pages get time outed very frequently (Time Out Wix page, error 500), which wasn’t happening before.
I tried to understand what may cause such an issue, so I created very simple router page to play with. https://dmitrybi32.wixsite.com/issue-reproduce/router-issue/item6
Here router code logs to “router_test” collection current URL’s path[0] (item6 in this case) and current time.
At frontend side I fetch router’s reply with
routerData = wixWindow.getRouterData();
First I observed that router code may run several times.
In some cases it may run 4 times, while the records in database look like the following:
request.path[0] = wix-freemuim-css-entry.css.map Time : 22:4:7:493
request.path[0] = item6 Time : 22:4:7:277
request.path[0] = item6 Time : 22:4:7:277
request.path[0] = item6 Time : 22:4:5:963
All the above for the single page load, while the last stored record also captured wix-freemuim-css-entry.css.map instead of “item6”.
Is it expected behavior?
Worth noting, that I didn’t find real correlation between page getting time outed, and number of timer page’s router code had been running.
But probably you may see it from your side.
As for timeouts for the current sample page - it also very sporadic, but easily reproducible after several page loads.
Again, I started seeing the timeouts recently, but it makes the work with site impossible.
Please help with checking this issue from your side.
I too am seeing this timeout error 500 message a lot for Dynamic pages and Router pages.
My temporary solution has been to set a timeout at onReady(…), which is clearly not satisfactory, as the length of the timeout periods are not consistent.
Like I originally wrote before, it is a temporary solution that sometimes works, as the Wix timeout is not consistently the same, and having a longer delayed time is not a good user experience.
I’m also having timeout issues with my router pages.
It only seems to affect routers which don’t return immediately (within milliseconds), i.e. need to access an API via a fetch etc.
Interestingly if you access the route via a link on the Wix site everything works as expected. But as soon as you access the route directly you “immediately” get a 500 Timeout error.
It feels like Wix is setting some sort of timeout allowance when following a route from an internal link on a Wix page, but not applying that same timeout allowance when accessing the route directly.
The example below will produce the 500 timeout error intermittently probably due to the external API’s varying response times:
import {ok, notFound, WixRouterSitemapEntry} from “wix-router”;
import {fetch} from ‘wix-fetch’;
export function test_Router(request){
let options = {
method: ‘GET’,
headers:{
“Content-Type”: “application/json”,
“Accept”: “application/json”
}
};
Hi WIX team.
I also still experiencing same issue.
On the first attempt to access the reproduce page provided in original post, I got 500 timeout, as it was previously.
Thanks,
Dima
currently we are having an issue with long running router page requests and our SSR engine (it makes the initial page load faster). We are working on resolving this as soon as possible.
If you are making external long running requests in router pages or use dynamic pages together with DB Drivers, you may be affected.
If you are experiencing an issue, please report the page and we will temporarily exclude you from our SSR engine. This may make your initial page load a little slower for the time being. We will re-enable it for you as soon as this is fixed.
We are sorry for any inconvenience this may be causing.
A fix was deployed that should prevent getting the 500 error message.
Please report if you’re still experiencing this.
Also, please note that when writing custom router code you should keep performance in mind.
You might experience degraded rendering times in case the router does not respond quickly (e.g. when it is doing a call to a slow third-party API)
Our site is no longer having the router issue above, however it’s been having a terrible time navigating between pages. When we try, we’ve been greeted with a blank white screen sometimes.