Upgrade from 5.5.2 to 5.5.4

Hello everyone,

During the upgrade, I receive the following error:

FormatException: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

Thank you.

It usually means something is timing out in, either fast-cgi, php, nginx or proxy if you use one. The update should continue in the background. if you wait a few minutes and reload the page the update should complete.
Important: Do not try to force the upgrade again for 10 mins or so as if you start the update again while the first one is running in the background you can kill your install.

It doesn’t seem to have any negative impact but if it bothers you, you can try and fix it:

Check your nginx/apache error logs for invoice ninja (mine are /vat/log/nginx/ininja.error.log, it should tell you what happened. (if it is the proxy that is timing out your server logs will be empty, check proxy instead)

You can also change the following to in your php config and see if it helps:

post_max_size 512
upload_max_filesize 510
max_memory_limit 1024
max_execution_time 300
max_input_time 300

AND add/change the below in your nginx config (mine is /etc/nginx/conf.d/invoiceninja.conf under the http heading:

fastcgi_connect_timeout 300s;
fastcgi_read_timeout 300s;
fastcgi_send_timeout 300s;
fastcgi_keep_conn on;

If you are using a proxy the error wont be in your nginx logs, check the proxy logs and timeout values and adjust accordingly.

Let us know if that helped (you can test it out by forcing the update again) just make sure you have a backup. Post error logs if you are still having an issue and we’ll try to help further.

1 Like

Thanks very much @strider27! The PHP config increase settings did the trick. I’m running Apache instead of nginx, you wouldn’t happen to know what the syntax is for my web server?

Best regards

@CTG wouldn’t know apache config out of the top of my head, but have a look here (Disable the timeouts on apache httpd and fastcgi - Server Fault)
I’d say don’t increase any of them unless you have to, most of them set to their defaults for a reason (I e. Slowloris attack etc)

Cheers @strider27, appreciate the help once again!