Unable to update deployed page, getting invalid JSON from codegen servers

I’m having a problem updating the deployed page. I’ve set up a plasmic host with nextjs, in headless api mode, with the code as generated by the script. I’ve seen that the nextjs app connects each minute to plasmic.app to check if there is a new version of the page. Normally it works ok, but when the server is running for several hours, suddenly the bundle fetch starts failing. From then on, it always fail until the server is restarted (and then it runs ok again). I’ve looked at fetchLoaderData and parseJsonResponse functions in Plasmic loder-fetcher module, but can’t get any more information. Only have those log traces. Do you have any clue to where to continue investigating? Thanks.

Jan 29 18:08:43 <my.server> npm[79358]: Error: Error parsing JSON response: SyntaxError: Unexpected end of JSON input; response:
Jan 29 18:08:43 <my.server> npm[79358]:     at r.parseJsonResponse (/home/<my.app.path>/node_modules/@plasmicapp/loader-fetcher/dist/loader-fetcher.cjs.production.mi>
Jan 29 18:08:43 <my.server> npm[79358]:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Jan 29 18:08:43 <my.server> npm[79358]:     at async r.fetchLoaderData (/home/<my.app.path>/node_modules/@plasmicapp/loader-fetcher/dist/loader-fetcher.cjs.productio>