Comments (18)
@imtoanle : Welcome to this project! Judging from the error message it looks like an error in the ISR feature. The problem seems to be that whenever a new page is ISR generated with previously unknown images, those images are auto-analyzed and the meta-info is written to the file-system cache. However, the file-system cache can only be written during deploy, after that it is only readable.
Until I have found a fix, you have the following workaround options available, you may want to disable one of the following features in appConfig.js
.
- disable ISR
- disable image optimization (nextFeatureImages and nextInlineImage)
- disable
fileCache
The last option is probably best option at hand. Going forward, I most likely need to disable the fileCache
writes on ISR.
from next-cms-ghost.
@styxlab It makes sense. Thanks for your explanation
Thank again for your amazing works in this project.
from next-cms-ghost.
Can you please test ISR with the latest version again? The error should be fixed.
from next-cms-ghost.
@styxlab I saw your exception mession in log. But request still returned 502 error.
This function loaded > 10 seconds so it was killed by Vercel
https://comoex.com/_next/data/mMB3xKBb_vitRw_92p4yU/hop-dong-ky-han-va-hop-dong-tuong-lai-la-gi.json
from next-cms-ghost.
@styxlab I found the reason.
When i fast scroll my home page to end. https://comoex.com
Homepage already rendered all 170 posts. So Next loaded 170 jsons and caused overload issue.
Vercel told > 10 seconds for handle request.
Do we have feature to limit 10->20 posts in home page / tag page ?
from next-cms-ghost.
@styxlab I could limit home page posts by add limit value to getAllPosts
in pages/index.tsx
.
I think infinite scroll here is better. Could we implement this ?
from next-cms-ghost.
Before going into solution mode, I would like to understand your requirements better. How many posts does your site have? Is this a problem after initial deploy, does it occur only on the index page, does it go away after a while or does it persist?
There is also a maxNumberOfPost option available as part of the ISR feature but it does not affect the index page.
from next-cms-ghost.
@styxlab My site have total 170 posts. All of them were rendered in home page and tag page.
When i scroll this page. Next js will fetch json data foreach post.
Vercel will be slowed when handle many requests at the same time and they limited 10 seconds for "Serverless Function Execution Timeout (Seconds)". See: https://vercel.com/docs/platform/limits
So json request got 502 error.
This issue always happen on a site has many posts.
Eg: https://comoex.com/tag/tai-lieu
from next-cms-ghost.
Thanks for the info, I know these limits but still don't understand why you run into them. Could you please publish
- your
appConfig.js
settings (only the ones that deviate from the default settings) - publish your Ghost CMS keys, so I can test your site myself (you can create new keys that you can delete afterwards).
- Does this only happen with ISR? What happens when you disable ISR?
I also don't see any issues when scrolling your site at https://comoex.com/tag/tai-lieu, but maybe some posts are missing there?
from next-cms-ghost.
@imtoanle: Are you still interested in keeping this thread open or did you find a solution in the meantime?
from next-cms-ghost.
@styxlab Sorry. I came back, i got busy few days ago.
The first your fix resolved file cache issue.
Regarding to timed out issue. Please see video https://recordit.co/uGP45cax8M
Version: https://comoex-next-theme-3s9rk1902.vercel.app/tag/tai-lieu
It's working if disable ISR feature
from next-cms-ghost.
@imtoanle: No problem. Could you publish (temporary) keys, so I can test the site locally? I also notice that you are using a modified version for page navigation.
About the timeouts. Even if you run into them, shouldn't they go away after a while as all sites are regenerated? Still a porblem, I know, but of lesser degree if it's only temporary.
Also: Did you contact Vercel about this? I may find some ways to load less data, but the root cause is infrastructure related.
from next-cms-ghost.
@styxlab Sure. I tried to add pagination to avoid this issue but it didn't work.
After fast scroll throught 3 pages or just one page in original version. ISR called many serverless requests in queue and they're timed out (just my guess).
My key
Content API key: b665df815928ee25f9643ca50f
API URL: https://cms.comoex.com
from next-cms-ghost.
I already get timeouts during local building (yarn build
):
You should first look into your Ghost CMS, you may have to lift access limits there. Look into the rate limits in your Ghost config.
Apart from Ghost CMS, ETIMEDOUT may also indicate problems with the hosting provider where you Ghost CMS is residing. The errors on Vercel may just be a result of not being able to fetch the data from your Ghost CMS.
This would make much more sense, because ISR issues should be temporary and vanish, once a site has been re-generated for the first time.
from next-cms-ghost.
@styxlab Thanks! really appreciate your advice.
I 'll have a look and feedback to you soon
from next-cms-ghost.
@all-contributors please add @imtoanle for bug
from next-cms-ghost.
I've put up a pull request to add @imtoanle! 🎉
from next-cms-ghost.
Closing as inactive. Can be re-opened anytime.
from next-cms-ghost.
Related Issues (20)
- Changing theme settings doesn't work HOT 4
- Netlify Deploy workflow fails HOT 9
- next/images on Netlify HOT 2
- ISR on Netlify
- Open the images in full-screen display on click HOT 8
- Can I change my theme. HOT 1
- Pagination is not available HOT 12
- Error: Index creation failed - after adding API URL & Key HOT 10
- Integrate post/draft preview HOT 1
- getting issue on author image HOT 2
- I cant embed html scripts in my posts. HOT 1
- Upgrade Rehype HOT 2
- did you can add search bar HOT 1
- I can't send message in Contact page HOT 1
- Will this not work for Ghost V.5 and why not? HOT 1
- Working with local ghost installation
- TypeError: withImageLoader is not a function (warning [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. HOT 6
- Build error occurred ReferenceError: Cannot access 'api' before init
- Abandoned? HOT 1
- Build specific feed for each author
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next-cms-ghost.