-
Notifications
You must be signed in to change notification settings - Fork 86
[Bug]: ISR Not Working #1189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm interested in those FetchErrors in the logs. Do those requests work on SSR pages? |
Those are all getting called in |
Take this example:
This is a page that is statically generated dynamically at build time using That error indicates in my experience that the application is hitting the API endpoint rapidly--something you'd usually see if |
I might have misunderstood the question, sorry. I haven't tried fetching data for this page with SSR, but it seems like you're suggesting SSG isn't fetching the data. It is fetching the data--it's just not updating the data via ISR for some reason. And it also looks like those fetches are successful anyway, but that they are attempting to fetch again before the first connection is closed, which causes that error. |
So I've spent the whole day trying to isolate this issue. At one point I created a new site on Netlify to see if the issue followed me to the new site. It did--with the same FetchError. I've converted the whole site to SSR, and as you'd expect the error was gone, but obviously that doesn't fix ISR. I tried using SSG with ISR on just one page--the error returned and ISR did not work. Finally, I had the idea to deploy the same site to Vercel. The issue disappeared. ISR works fine on Vercel with no changes to the source code. |
OK, thanks for the details. I'm going to look into this today. |
Hi. Could you see if version 4.2.4 of |
Had the same or similar issue, upgrading to 4.2.4 fixed it for me. |
Thanks @jota |
Yep. It looks like 4.2.4 resolved the issue. Thank you. |
Great! Thanks again for your help in tracking this down. Sorry it too so much of your time. |
thought it was solved, but now started getting different errors, not sure if this is related still posting here in case somebody else has the same:
I would think that the way nextjs works, even if ISR has an error, it would show the previously rendered version. strange... Netlify functions logs (nothing more in there, first statement in getStaticProps is a console.log that does not even show up here): any ideas how to debug this? |
Sounds like the function is timing out. I imagine Netlify has some kind of limit on function execution. If the the odb function is timing out it would be a 500 type error I think. Also, the minimum revalidate interval is 60s on Netlify. Have you tried setting revalidate to 60s as a way to isolate the error? It should have set the revalidate to 60 during build and notified you that it did. Maybe that broke in this patch. |
If it's set to less than 60s then we just increase it to 60, so that won't be the issue. @jota this looks like a separate issue, so if you're not able to find the problem please open a new issue with all of the requested details |
Thanks for the input! Someone else already opened an issue with that same problem (here) |
Summary
I have a site that isn't updating without a full redeploy, though
fallback
is set toblocking
, andrevalidate
is set to60
. This is a decoupled Wordpress setup that fetches its data through a plugin that extends it to GraphQL. Here is an example of my code from one page, but the problem is site-wide. None of the pages update. Here's an example page, but the problem is site-wide.I'm not building using the CLI. I'm simply pushing to GitHub, which triggers the deploy. This site is a near copy of another site, and that site is revalidating. The function logs seem to reveal an issue in which the server is closing the connection, but I'm not sure if this is server related, or because of the behavior of the plugin.
Steps to reproduce
getStaticProps
return object + ~60s for updating.Content not updating to CMS content.
A link to a reproduction repository
No response
Plugin version
4.2.2
More information about your build
netlify.toml
)What OS are you using?
No response
Your netlify.toml file
`netlify.toml`
# Paste content of your `netlify.toml` file here
Your public/_redirects file
`_redirects`
# Paste content of your `_redirects` file here
Your
next.config.js
file`next.config.js`
Builds logs (or link to your logs)
Build logs
Function logs
Function logs
.next JSON files
generated .next JSON files
The text was updated successfully, but these errors were encountered: