transitive-bullshit / nextjs-notion-starter-kit

Deploy your own Notion-powered website in minutes with Next.js and Vercel.
https://transitivebullsh.it/nextjs-notion-starter-kit
MIT License
6.17k stars 5.24k forks source link

Task timed out after 10.01 seconds #80

Closed philffm closed 3 years ago

philffm commented 3 years ago

Hi @transitive-bullshit

Great project, working super reliable so far 🎉

However now after filling the page with some content, Vercel is constantly throwing me "Task timed out after 10.01 seconds". The only way to update the content right now, is to redeploy. I tried increasing the concurrency value in get-site-maps.ts, but without any luck so far.

It is possible to create new items on the home page - but the urls / new pages are not instantly generated (need to redeploy).

Screenshot 2021-04-02 at 17 28 42

https://www.notion.so/UX-Life-0aac38d9e5994f8aa7d586dec4c6883e

Do you have an idea?

Best, Phil

transitive-bullshit commented 3 years ago

Hey @philffm, thanks for the report & the kind words 🙏

The biggest reason it is timing out is due to https://github.com/transitive-bullshit/nextjs-notion-starter-kit/issues/58

We're currently doing a lot of unnecessary work each time a new URL alias is fetched to resolve the mapping from URL alias => notion ID.

We can definitely improve this; I'll try to get a workaround in later tonight.

See also #79.

transitive-bullshit commented 3 years ago

@philffm as a workaround for now, you can add includeNotionIdInUrls: true to your sitemap.

This will make your non-root site URLs include Notion IDs which will resolve much faster.

transitive-bullshit commented 3 years ago

Tracking a WIP solution here: https://github.com/transitive-bullshit/nextjs-notion-starter-kit/pull/83

philffm commented 3 years ago

Awesome! It just works... again! 🎉