opennextjs-netlify: [Bug]: ISR Not Working
Summary
I have a site that isn’t updating without a full redeploy, though fallback is set to blocking, and revalidate is set to 60. 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.
export async function getStaticProps({ params }) {
const data = await getJobOpenings() // Fetches from GraphQL
const primaryNavMenu = await getPrimaryMenu() // Fetches from GraphQL
const footerNavMenu = await getFooterMenu() // Fetches from GraphQL
return {
props: {
openingFields: data.nodes,
primaryNav: primaryNavMenu.menus.edges[0].node,
footerNav: footerNavMenu.menus.edges[0].node,
slug: params.slug,
},
revalidate: 60
}
}
export async function getStaticPaths() {
const data = await getJobOpenings()
return {
paths: data?.nodes.filter((opening) => opening.openingFields.agency === 'JusticePoint').map((node) => `/jp-apply/${node.slug}`) || [],
fallback: 'blocking'
}
}
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
- Make update in CMS
- Wait interval specified by revalidate property in
getStaticPropsreturn object + ~60s for updating. - Refresh page.
Content not updating to CMS content.
A link to a reproduction repository
No response
Plugin version
4.2.2
More information about your build
- I am building using the CLI
- I am building using file-based configuration (
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`
module.exports = {
reactStrictMode: true,
images: {
domains: ['localhost', 'sironarecovery.wpengine.com'],
}
}
Builds logs (or link to your logs)
Build logs
# Paste logs here
Function logs
Function logs
10:05:53 AM 7d4c1655 ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:05:53 AM 7d4c1655 ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:05:53 AM 7d4c1655 ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:05:54 AM 065e9a86 INFO [GET] /careers/pretrial-case-manager-5 (ISR)
10:05:54 AM 065e9a86 Duration: 929.93 ms Memory Usage: 98 MB
10:06:10 AM b4583650 INFO [GET] /justicepoint-careers (ISR)
10:06:10 AM b4583650 Duration: 194.56 ms Memory Usage: 110 MB
10:06:10 AM 5c6c9850 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/careers/case-manager-2.json (ISR)
10:06:10 AM 5c6c9850 Duration: 9.54 ms Memory Usage: 110 MB
10:06:11 AM eaec00f4 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/jp-apply/case-manager-2.json (ISR)
10:06:11 AM eaec00f4 Duration: 8.81 ms Memory Usage: 110 MB
10:06:11 AM a13403c4 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/justicepoint-careers/case-manager-2.json (ISR)
10:06:11 AM a13403c4 Duration: 8.86 ms Memory Usage: 110 MB
10:06:11 AM c1b8696a INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/careers/pretrial-case-manager-3.json (ISR)
10:06:11 AM c1b8696a Duration: 6.98 ms Memory Usage: 110 MB
10:06:11 AM 2543b5b7 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/justicepoint-careers/pretrial-case-manager-3.json (ISR)
10:06:11 AM 2543b5b7 Duration: 8.30 ms Memory Usage: 110 MB
10:06:11 AM 49e72fc9 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/jp-apply/pretrial-case-manager-3.json (ISR)
10:06:11 AM 49e72fc9 Duration: 8.80 ms Memory Usage: 110 MB
10:06:13 AM 67a12168 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/careers/jail-screening-specialist-4.json (ISR)
10:06:13 AM 67a12168 Duration: 22.93 ms Memory Usage: 110 MB
10:06:13 AM eb526fb6 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/justicepoint-careers/jail-screening-specialist-4.json (ISR)
10:06:13 AM eb526fb6 Duration: 5.25 ms Memory Usage: 110 MB
10:06:13 AM 3a37d95c ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:06:13 AM 3a37d95c ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:06:13 AM 3a37d95c ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:06:13 AM 90e629ea INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/jp-apply/jail-screening-specialist-4.json (ISR)
10:06:13 AM 90e629ea Duration: 14.42 ms Memory Usage: 142 MB
10:06:15 AM d2be0a00 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/careers/case-manager.json (ISR)
10:06:15 AM d2be0a00 Duration: 7.75 ms Memory Usage: 142 MB
10:06:15 AM 065c2d72 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/jp-apply/case-manager.json (ISR)
10:06:15 AM 065c2d72 Duration: 6.21 ms Memory Usage: 142 MB
10:06:15 AM 5bcd5e0d INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/justicepoint-careers/case-manager.json (ISR)
10:06:15 AM 5bcd5e0d Duration: 6.85 ms Memory Usage: 142 MB
10:06:15 AM 53346dd7 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/careers/diversion-case-manager-2.json (ISR)
10:06:15 AM 53346dd7 Duration: 7.70 ms Memory Usage: 142 MB
10:06:16 AM 14f4f2d1 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/jp-apply/diversion-case-manager-2.json (ISR)
10:06:16 AM 66e53d71 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/justicepoint-careers/diversion-case-manager-2.json (ISR)
10:06:16 AM 14f4f2d1 Duration: 14.61 ms Memory Usage: 142 MB
10:06:16 AM 66e53d71 Duration: 8.61 ms Memory Usage: 110 MB
10:06:16 AM 406bbcc3 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/careers/jp-installer.json (ISR)
10:06:16 AM 406bbcc3 Duration: 6.12 ms Memory Usage: 110 MB
10:07:41 AM 406bbcc3 ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:07:41 AM 406bbcc3 ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:07:41 AM 406bbcc3 ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:07:41 AM 406bbcc3 ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:07:41 AM 62bc1e12 INFO [GET] /justicepoint-careers/case-manager-2 (ISR)
10:07:41 AM 62bc1e12 Duration: 28.09 ms Memory Usage: 110 MB
10:07:42 AM f732c71b INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/jp-apply/case-manager-2.json (ISR)
10:07:42 AM f732c71b Duration: 4.78 ms Memory Usage: 110 MB
10:08:13 AM f732c71b ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:08:13 AM f732c71b ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:08:13 AM f732c71b ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:08:13 AM f732c71b ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:08:13 AM f732c71b ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:08:13 AM 1b1158cd INFO [GET] /news/recovery-reimagined/ (ODB)
10:08:13 AM 1b1158cd Duration: 11.88 ms Memory Usage: 110 MB
10:08:14 AM 2cf72bf8 INFO [GET] /news/recovery-reimagined (ISR)
10:08:14 AM 2cf72bf8 Duration: 18.55 ms Memory Usage: 110 MB
10:08:18 AM 1156a02f INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/index.json (ISR)
10:08:18 AM 1156a02f Duration: 890.40 ms Memory Usage: 115 MB
10:08:18 AM 964bb510 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/programs/hph.json (ISR)
10:08:18 AM 964bb510 Duration: 11.11 ms Memory Usage: 115 MB
10:08:18 AM a687de56 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/programs.json (ISR)
10:08:18 AM a687de56 Duration: 8.96 ms Memory Usage: 115 MB
10:08:19 AM 16529289 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/programs/rsc.json (ISR)
10:08:19 AM 16529289 Duration: 8.44 ms Memory Usage: 115 MB
10:08:19 AM f2d8dd10 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/programs/teen.json (ISR)
10:08:19 AM f2d8dd10 Duration: 6.55 ms Memory Usage: 115 MB
10:08:19 AM 8c31438e INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/programs/otc.json (ISR)
10:08:19 AM 8c31438e Duration: 282.49 ms Memory Usage: 117 MB
10:08:19 AM 542bba67 INFO [GET] /_next/data/2ApuxsqUdUIwtNZvk6Vpj/programs/sa.json (ISR)
10:08:19 AM 542bba67 Duration: 6.94 ms Memory Usage: 117 MB
10:08:45 AM 542bba67 ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: socket hang up
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketOnEnd (_http_client.js:499:9)
at TLSSocket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:08:45 AM 542bba67 ERROR FetchError: request to https://sironarecovery.wpengine.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established
at ClientRequest.<anonymous> (/var/task/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
at ClientRequest.emit (events.js:400:28)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET'
}
10:08:45 AM 880d718d INFO [GET] / (ISR)
10:08:45 AM 880d718d Duration: 32.38 ms Memory Usage: 117 MB
.next JSON files
generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (6 by maintainers)
Had the same or similar issue, upgrading to 4.2.4 fixed it for me.
Great! Thanks again for your help in tracking this down. Sorry it too so much of your time.