Exceeding Shared Hosting Resources

Hi all - I’m back again. Happy 2025. It’s been some time. Having this issue and hopefully it can be worked out. Let’s see how it goes?

Version: 5.11.62

Environment: Shared Hosting

Checklist

  • Can you replicate the issue on our v5 demo site https://demo.invoiceninja.com or Invoice Ninja?
    • NO
  • Have you searched existing issues?
    • YES
  • Have you inspected the logs in storage/logs/laravel.log for any errors?
    • YES

Describe the bug

Shared hosting resources are being locked up.

Steps To Reproduce

Literally doing anything on my shared hosting site causes an issue.

Expected Behavior

500 errors or just the pages not loading. If they do load, there are messages that “something went wrong”.

Additional context

Have the hosting provider tech support available - not readily - but they can provide assistance.

Thus far they’ve send details to me which I’ll share here.

Screenshots

Logs

MYSQL

±-------±-----------------±----------±-----------------±--------±-----±-------------±------------------------------------------------------------------------------------±---------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
±-------±-----------------±----------±-----------------±--------±-----±-------------±------------------------------------------------------------------------------------±---------+
| 103177 | NINJA_USER | localhost | NINJA_DB | Sleep | 59 | | | 0.000 |
| 103182 | NINJA_USER | localhost | NINJA_DB | Sleep | 58 | | | 0.000 |
| 103191 | NINJA_USER | localhost | NINJA_DB | Sleep | 57 | | | 0.000 |
| 103201 | NINJA_USER | localhost | NINJA_DB | Sleep | 55 | | | 0.000 |
| 103217 | NINJA_USER | localhost | NINJA_DB | Sleep | 53 | | | 0.000 |
| 103231 | NINJA_USER | localhost | NINJA_DB | Sleep | 51 | | | 0.000 |
| 103236 | NINJA_USER | localhost | NINJA_DB | Sleep | 50 | | | 0.000 |
| 103259 | NINJA_USER | localhost | NINJA_DB | Sleep | 48 | | | 0.000 |
| 103287 | NINJA_USER | localhost | NINJA_DB | Sleep | 43 | | | 0.000 |
| 103288 | NINJA_USER | localhost | NINJA_DB | Sleep | 43 | | | 0.000 |
| 103295 | NINJA_USER | localhost | NINJA_DB | Sleep | 42 | | | 0.000 |
| 103314 | NINJA_USER | localhost | NINJA_DB | Sleep | 39 | | | 0.000 |
| 103321 | NINJA_USER | localhost | NINJA_DB | Sleep | 38 | | | 0.000 |
| 103331 | NINJA_USER | localhost | NINJA_DB | Sleep | 37 | | | 0.000 |
| 103349 | NINJA_USER | localhost | NINJA_DB | Sleep | 34 | | | 0.000 |
| 103356 | NINJA_USER | localhost | NINJA_DB | Sleep | 33 | | | 0.000 |
| 103363 | NINJA_USER | localhost | NINJA_DB | Sleep | 33 | | | 0.000 |
| 103364 | NINJA_USER | localhost | NINJA_DB | Sleep | 32 | | | 0.000 |
| 103372 | NINJA_USER | localhost | NINJA_DB | Sleep | 31 | | | 0.000 |
| 103393 | NINJA_USER | localhost | NINJA_DB | Sleep | 29 | | | 0.000 |
| 103394 | NINJA_USER | localhost | NINJA_DB | Sleep | 29 | | | 0.000 |
| 103397 | NINJA_USER | localhost | NINJA_DB | Sleep | 28 | | | 0.000 |
| 103447 | NINJA_USER | localhost | NINJA_DB | Sleep | 23 | | | 0.000 |
| 103455 | NINJA_USER | localhost | NINJA_DB | Sleep | 21 | | | 0.000 |
| 103457 | NINJA_USER | localhost | NINJA_DB | Sleep | 21 | | | 0.000 |
| 103470 | NINJA_USER | localhost | NINJA_DB | Sleep | 19 | | | 0.000 |
| 103478 | NINJA_USER | localhost | NINJA_DB | Sleep | 18 | | | 0.000 |
| 103486 | NINJA_USER | localhost | NINJA_DB | Sleep | 17 | | | 0.000 |
| 103492 | NINJA_USER | localhost | NINJA_DB | Sleep | 16 | | | 0.000 |
| 103498 | NINJA_USER | localhost | NINJA_DB | Sleep | 15 | | | 0.000 |
| 103512 | NINJA_USER | localhost | NINJA_DB | Sleep | 14 | | | 0.000 |
| 103519 | NINJA_USER | localhost | NINJA_DB | Sleep | 13 | | | 0.000 |
| 103520 | NINJA_USER | localhost | NINJA_DB | Sleep | 13 | | | 0.000 |
| 103534 | NINJA_USER | localhost | NINJA_DB | Sleep | 11 | | | 0.000 |
| 103535 | NINJA_USER | localhost | NINJA_DB | Sleep | 11 | | | 0.000 |
| 103541 | NINJA_USER | localhost | NINJA_DB | Sleep | 10 | | | 0.000 |
| 103546 | NINJA_USER | localhost | NINJA_DB | Sleep | 9 | | | 0.000 |
| 103552 | NINJA_USER | localhost | NINJA_DB | Sleep | 8 | | | 0.000 |
| 103558 | NINJA_USER | localhost | NINJA_DB | Sleep | 7 | | | 0.000 |
| 103561 | NINJA_USER | localhost | NINJA_DB | Sleep | 7 | | | 0.000 |
| 103564 | NINJA_USER | localhost | NINJA_DB | Sleep | 6 | | | 0.000 |
| 103568 | NINJA_USER | localhost | NINJA_DB | Sleep | 6 | | | 0.000 |
| 103574 | NINJA_USER | localhost | NINJA_DB | Sleep | 5 | | | 0.000 |
| 103579 | NINJA_USER | localhost | NINJA_DB | Sleep | 4 | | | 0.000 |
| 103581 | NINJA_USER | localhost | NINJA_DB | Sleep | 4 | | | 0.000 |
| 103588 | NINJA_USER | localhost | NINJA_DB | Sleep | 3 | | | 0.000 |
| 103590 | NINJA_USER | localhost | NINJA_DB | Sleep | 3 | | | 0.000 |
| 103595 | NINJA_USER | localhost | NINJA_DB | Sleep | 3 | | | 0.000 |
| 103596 | NINJA_USER | localhost | NINJA_DB | Sleep | 2 | | | 0.000 |
| 103597 | NINJA_USER | localhost | NINJA_DB | Sleep | 2 | | | 0.000 |
| 103612 | NINJA_USER | localhost | NINJA_DB | Sleep | 2 | | | 0.000 |
| 103617 | NINJA_USER | localhost | NINJA_DB | Sleep | 1 | | | 0.000 |
| 103618 | NINJA_USER | localhost | NINJA_DB | Sleep | 1 | | | 0.000 |
| 103621 | NINJA_USER | localhost | NINJA_DB | Sleep | 0 | | | 0.000 |
| 103626 | NINJA_USER | localhost | NINJA_DB | Sleep | 0 | | | 0.000 |
±-------±-----------------±----------±-----------------±--------±-----±-------------±------------------------------------------------------------------------------------±---------+

Other Processes

WEBSPACE_USER 2333774 0.0 0.0 8652 5940 ? S 17:15 0:00 _ dovecot/imap
WEBSPACE_USER 2333855 0.0 0.0 8868 6144 ? S 17:15 0:00 _ dovecot/imap
WEBSPACE_USER 2363217 3.5 0.2 217464 96532 ? S 17:40 0:00 /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363238 4.4 0.2 217464 96348 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363274 8.2 0.2 217464 96432 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363295 7.0 0.2 217464 96500 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363306 15.0 0.2 217464 96492 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363333 30.0 0.2 217464 96004 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363352 0.0 0.1 180652 56908 ? R 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363256 4.4 0.2 217460 96300 ? S 17:40 0:00 /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363276 6.0 0.2 217460 96368 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363292 7.7 0.2 217460 96344 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363307 14.5 0.2 217460 96100 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363332 31.0 0.2 217460 96492 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363353 0.0 0.1 178604 56620 ? R 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363301 9.3 0.2 217464 96312 ? S 17:40 0:00 /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363328 16.0 0.2 217464 96564 ? S 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363349 0.0 0.2 204760 83800 ? R 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363337 32.0 0.2 217592 96752 ? S 17:40 0:00 /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v
WEBSPACE_USER 2363354 0.0 0.0 6524 384 ? R 17:40 0:00 _ /opt/cpanel/ea-php81/root/usr/bin/php-cgi -v

One of the PHP-CGI processes running.

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
php-cgi 2381144 WEBSPACE_USER cwd DIR 253,0 20480 588084097 /home/WEBSPACE_USER/public_html/invoice/public
php-cgi 2381144 WEBSPACE_USER rtd DIR 253,0 179 542652332 /
php-cgi 2381144 WEBSPACE_USER 0r FIFO 0,13 0t0 38434588 pipe
php-cgi 2381144 WEBSPACE_USER 1w FIFO 0,13 0t0 38522038 pipe
php-cgi 2381144 WEBSPACE_USER 2w FIFO 0,13 0t0 38434590 pipe
php-cgi 2381144 WEBSPACE_USER mem REG 253,0 41752 541451893 /opt/alt/php82/usr/lib64/php/modules/pdo_sqlite.so
php-cgi 2381144 WEBSPACE_USER mem REG 253,0 36776 810004083 /opt/alt/php82/etc/mariadb1011/pdo_mysql.so
php-cgi 2381144 WEBSPACE_USER mem REG 253,0 372840 539895199 /usr/lib64/libmariadb.so.3
php-cgi 2381144 WEBSPACE_USER mem REG 253,0 174400 810004082 /opt/alt/php82/etc/mariadb1011/mysqli.so
php-cgi 2381144 WEBSPACE_USER mem REG 253,0 242744 541451894 /opt/alt/php82/usr/lib64/php/modules/mysqlnd.so
php-cgi 2381144 WEBSPACE_USER 3r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 4u unix 0xffff96a9d4e23c00 0t0 38439075 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 5r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 6u unix 0xffff96a9d4e22800 0t0 38439168 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 7r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 8u unix 0xffff96a9d4e21400 0t0 38439175 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 9r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 10u unix 0xffff96aa0e4b4100 0t0 38437619 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 11r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 12u unix 0xffff96a927e0c100 0t0 38442039 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 13r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 14u unix 0xffff96a9750ec100 0t0 38441018 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 15r FIFO 0,13 0t0 32853695 pipe
php-cgi 2381144 WEBSPACE_USER 16w FIFO 0,13 0t0 32853695 pipe
php-cgi 2381144 WEBSPACE_USER 17r FIFO 0,13 0t0 32853696 pipe
php-cgi 2381144 WEBSPACE_USER 18w FIFO 0,13 0t0 32853696 pipe
php-cgi 2381144 WEBSPACE_USER 19r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 20u unix 0xffff96a9d4e24600 0t0 38439199 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 21r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 22u unix 0xffff96a927e0a300 0t0 38442055 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 23r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 24u unix 0xffff96a95eef5a00 0t0 38436512 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 25r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 26u unix 0xffff96a9d4e20a00 0t0 38439229 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 27r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 28u unix 0xffff96a9750ec600 0t0 38441034 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 29r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 30u unix 0xffff96a9d4e27800 0t0 38439242 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 31r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 32u unix 0xffff96a9750edf00 0t0 38441036 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 33r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 34u unix 0xffff96a99e7be900 0t0 38427420 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 35u unix 0xffff96a927e0e900 0t0 38442071 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 36r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 37u unix 0xffff96aae4e26400 0t0 38440173 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 38r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 39u unix 0xffff96a902f2c600 0t0 38439256 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 40r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php
php-cgi 2381144 WEBSPACE_USER 41u unix 0xffff96a902f2df00 0t0 38439260 type=STREAM (CONNECTED)
php-cgi 2381144 WEBSPACE_USER 42r REG 253,0 1850 589175031 /home/WEBSPACE_USER/public_html/invoice/public/index.php

And direct quote from the support team.

Those lines are repeated like 1.5k times. I have snipped most of the lines to include it on the reply.

Please note that this is an application problem not a server side issue. The 500 error goes away if we kill the process running under the account and when these process starts running again it will soon exhaust the CPU and memory allocated to your account and the error will be back.


So here I am. Any assistance to figure it out would be appreciated.

What I’ve been trying to do is use the backup/restore feature. I’ve asked the hosting team to increase my resources temporarily. The intent is to do a backup - scrub the instance entirely - do a fresh install and test - then restore from the backup.

I’m hoping that will carry over all of my clients, items, prices, settings related to recurring stuff, etc.

But yeah - any help appreciated.

I had found this which seems somewhat related - but not entirely (I think?)…

Hi,

Do you see any details about the 500 error in storage/logs?

Hi @hillel - hope you’re doing fine. Nope - not seeing anything. Here’s the file - hopefully sanitized.

You may want to try deleting the log file, triggering the error and then checking it again.

I also suggest trying with the desktop app.

Alright. Removing the file and will try again.

[2025-04-03 23:55:17] production.INFO: db fails
[2025-04-03 23:55:17] production.INFO: db fails
[2025-04-03 23:55:22] production.INFO: db fails
[2025-04-03 23:55:23] production.INFO: db fails
[2025-04-03 23:55:25] production.INFO: db fails
[2025-04-03 23:55:30] production.INFO: db fails
[2025-04-03 23:55:30] production.INFO: db fails
[2025-04-03 23:55:34] production.INFO: db fails
[2025-04-03 23:55:35] production.INFO: db fails
[2025-04-03 23:55:37] production.INFO: db fails
[2025-04-03 23:55:47] production.INFO: db fails
[2025-04-03 23:55:54] production.INFO: db fails
[2025-04-03 23:55:55] production.INFO: db fails
[2025-04-03 23:55:56] production.INFO: db fails
[2025-04-03 23:55:57] production.INFO: db fails
[2025-04-03 23:55:57] production.INFO: db fails
[2025-04-03 23:55:57] production.INFO: db fails

I’m able to log in with the app - but I don’t have the backup/restore option there.

Same link as before - updated log after deletion of original.

Lots of different errors - none of which make any sense to me. Aside from “too many connections” error.

And I got this from the hosting provider as well.

Hosting provider increased my resources once more - this time the export gave a green checkmark. So I’m going to wait for the email to come in.

Here’s the log after the last one uploaded. Not sure exactly when it did whatever - but hopefully it shows something useful?

[2025-04-04 00:25:12] production.ERROR: SQLSTATE[HY000] [1203] User DB_USER already has more than 'max_user_connections' active connections (Connection: mysql, SQL: select * from `company_tokens` where `token` = HASHED_TOKEN and `company_tokens`.`deleted_at` is null limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 1203): SQLSTATE[HY000] [1203] User DB_USER already has more than 'max_user_connections' active connections (Connection: mysql, SQL: select * from `company_tokens` where `token` = HASHED_TOKEN and `company_tokens`.`deleted_at` is null limit 1) at /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php:825)
[stacktrace]
#0 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php(779): Illuminate\\Database\\Connection->runQueryCallback()
#1 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php(398): Illuminate\\Database\\Connection->run()
#2 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3106): Illuminate\\Database\\Connection->select()
#3 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3091): Illuminate\\Database\\Query\\Builder->runSelect()
#4 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3676): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#5 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3090): Illuminate\\Database\\Query\\Builder->onceWithColumns()
#6 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(811): Illuminate\\Database\\Query\\Builder->get()
#7 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(793): Illuminate\\Database\\Eloquent\\Builder->getModels()
#8 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(343): Illuminate\\Database\\Eloquent\\Builder->get()
#9 /home/WEB_USER/public_html/invoice/app/Http/Middleware/TokenAuth.php(36): Illuminate\\Database\\Eloquent\\Builder->first()
#10 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\TokenAuth->handle()
#11 /home/WEB_USER/public_html/invoice/app/Http/Middleware/SetDb.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#12 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\SetDb->handle()
#13 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#14 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\\Pipeline\\Pipeline->then()
#15 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\\Routing\\Router->runRouteWithinStack()
#16 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\\Routing\\Router->runRoute()
#17 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\\Routing\\Router->dispatchToRoute()
#18 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(201): Illuminate\\Routing\\Router->dispatch()
#19 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#20 /home/WEB_USER/public_html/invoice/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEventsMiddleware.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#21 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Http\\FlushEventsMiddleware->handle()
#22 /home/WEB_USER/public_html/invoice/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#23 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Http\\SetRequestIpMiddleware->handle()
#24 /home/WEB_USER/public_html/invoice/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#25 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Http\\SetRequestMiddleware->handle()
#26 /home/WEB_USER/public_html/invoice/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#27 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware->handle()
#28 /home/WEB_USER/public_html/invoice/app/Http/Middleware/Cors.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#29 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\Cors->handle()
#30 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(58): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#31 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Http\\Middleware\\TrustProxies->handle()
#32 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#33 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#34 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#35 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#36 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#37 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#38 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#39 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Http\\Middleware\\ValidatePostSize->handle()
#40 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#42 /home/WEB_USER/public_html/invoice/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php(79): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Tracing\\Middleware->handle()
#44 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#45 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Pipeline\\Pipeline->then()
#46 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#47 /home/WEB_USER/public_html/invoice/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle()
#48 {main}

[previous exception] [object] (PDOException(code: 1203): SQLSTATE[HY000] [1203] User DB_USER already has more than 'max_user_connections' active connections at /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:66)
[stacktrace]
#0 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(66): PDO->__construct()
#1 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(44): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()
#2 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()
#3 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(185): Illuminate\\Database\\Connectors\\MySqlConnector->connect()
#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()
#5 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1231): call_user_func()
#6 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1267): Illuminate\\Database\\Connection->getPdo()
#7 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php(512): Illuminate\\Database\\Connection->getReadPdo()
#8 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php(407): Illuminate\\Database\\Connection->getPdoForSelect()
#9 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php(812): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()
#10 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php(779): Illuminate\\Database\\Connection->runQueryCallback()
#11 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Connection.php(398): Illuminate\\Database\\Connection->run()
#12 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3106): Illuminate\\Database\\Connection->select()
#13 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3091): Illuminate\\Database\\Query\\Builder->runSelect()
#14 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3676): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#15 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3090): Illuminate\\Database\\Query\\Builder->onceWithColumns()
#16 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(811): Illuminate\\Database\\Query\\Builder->get()
#17 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(793): Illuminate\\Database\\Eloquent\\Builder->getModels()
#18 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(343): Illuminate\\Database\\Eloquent\\Builder->get()
#19 /home/WEB_USER/public_html/invoice/app/Http/Middleware/TokenAuth.php(36): Illuminate\\Database\\Eloquent\\Builder->first()
#20 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\TokenAuth->handle()
#21 /home/WEB_USER/public_html/invoice/app/Http/Middleware/SetDb.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#22 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\SetDb->handle()
#23 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#24 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\\Pipeline\\Pipeline->then()
#25 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\\Routing\\Router->runRouteWithinStack()
#26 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\\Routing\\Router->runRoute()
#27 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\\Routing\\Router->dispatchToRoute()
#28 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(201): Illuminate\\Routing\\Router->dispatch()
#29 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#30 /home/WEB_USER/public_html/invoice/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEventsMiddleware.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#31 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Http\\FlushEventsMiddleware->handle()
#32 /home/WEB_USER/public_html/invoice/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#33 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Http\\SetRequestIpMiddleware->handle()
#34 /home/WEB_USER/public_html/invoice/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#35 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Http\\SetRequestMiddleware->handle()
#36 /home/WEB_USER/public_html/invoice/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#37 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware->handle()
#38 /home/WEB_USER/public_html/invoice/app/Http/Middleware/Cors.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#39 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\Cors->handle()
#40 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(58): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Http\\Middleware\\TrustProxies->handle()
#42 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#44 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#45 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#46 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#47 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#48 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#49 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Http\\Middleware\\ValidatePostSize->handle()
#50 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#51 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#52 /home/WEB_USER/public_html/invoice/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php(79): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#53 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Tracing\\Middleware->handle()
#54 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#55 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Pipeline\\Pipeline->then()
#56 /home/WEB_USER/public_html/invoice/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#57 /home/WEB_USER/public_html/invoice/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle()
#58 {main}
"} 

EDIT
I’ve gotten no email thus far. Not sure what/why. Any thoughts @hillel?

EDIT
I’m able to run the health check now with the increased resources. Here’s a screenshot.

EDIT
So I hit it again at ‏‎7:54:26 PM - local time - and I’m waiting for the email. Still didn’t get the last one.

Going to wait until about 8:15PM local time and if nothing comes in - not sure what to do then. Maybe delete the log file and redo the export to see what gets logged?

EDIT
Welp. It’s been over 15 minutes and no email. Any ideas?

EDIT
Deleted the log file. Ran the export again. Just about identical to the above info in this post. Same starting with “DB_USER already has more than ‘max_user_connections’ active connections” and ending with “#58 {main}”. So - I stand by.

Alright - so after not getting any email for a while - I went into settings and set up back the SMTP details for the email - then I got the download link for the company file. Not what I expected, so it seems I will have to find a way to backup the information and restore.

Checking there I’m not seeing any specific CPU/RAM requirements, but it should not be exceeding what the shared hosting requires.

I may have to move IN elsewhere if that’s the case, because the heavy requirements currently are taking a toll.

In the desktop app you can change the export format from CSV to JSON to create the backup.

You may want to ask about the “too many connections” error on GitHub.

Thanks for that. I actually tried to do something else with the export from browser - but it seems like that’s got problems as well.

Since things seem to be working on a fresh setup - I’m going to edit the .env and point it to the old database - see what happens then.

Once I do that - can’t get in. The hosting provider put back my original package limits, so I assume it’s reverted to the bad behavior. Could I just clone certain parts of the database to the new one? I mean - it’s just like 2MB of data - it shouldn’t be giving this much trouble right?

Could there be some issue with the database having moved from v4 previously? Is there any way to rebuild this?

Based on what’s going on, I’ve tried to run an Ubuntu instance to attempt deploying - but no luck thus far. Using these resources - but no luck.

May have to do some further digging - but I’ve tried this on a fresh Ubuntu install and I have varying problems.

I’m not as Linux savvy as I’d like to be, and that’s why I try to simplify and write out details/guides for myself and others.

I did find some info elsewhere that may work with v5.5. Maybe I should attempt that and then udpate? The issue seems to be with the php version. In the end, none of the options I tried actually worked to get thigns running self-hosted. I’m open to added assistance though.

Let’s see if I can get the shared hosting working first. I’d rather keep things the way they were with that.

So…what are the CPU/RAM requirements like for running this? I assume it’s heavier than v4?

I’m not sure, here’s what ChatGPT suggests in case it’s helpful:


:brain: TL;DR: What’s Happening?

You’re on shared hosting, and your Invoice Ninja instance is overloading the available CPU/memory. This is likely caused by:

  • Zombie PHP-CGI processes (tons of them)
  • MySQL “Sleep” connections that are not being closed
  • Possibly Snappdf still running even when .env is switched to hosted_ninja
  • General app deadlocks causing repeated 500 errors

:magnifying_glass_tilted_left: What You Can Try Right Now

:white_check_mark: Step 1: Confirm .env + Queue Configs

Double-check these settings in your .env file:

PDF_GENERATOR=hosted_ninja
QUEUE_CONNECTION=database
CACHE_DRIVER=file
SESSION_DRIVER=file

Then run:

php artisan optimize:clear
php artisan config:clear

If your queue is not processing (which happens often on shared hosting), PDF jobs or other async jobs (email, invoices, etc.) might stack up and cause these zombie PHP processes.


:white_check_mark: Step 2: Kill the queue worker if it’s stuck

If php artisan queue:work is running as a long process (especially via cron), and your shared hosting doesn’t allow persistent workers, it might explain the bloat.

Temporarily disable any crons running it, or switch to:

php artisan queue:work --stop-when-empty

:white_check_mark: Step 3: Database “Sleep” Troubleshooting

MySQL sleep states like you showed indicate connections are not being closed. Laravel should be closing them unless a long script or buggy job keeps them open.

Try adding this to your .env to force short-lived MySQL connections:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=yourdbname
DB_USERNAME=youruser
DB_PASSWORD=yourpass
DB_OPTIONS='--wait_timeout=10 --interactive_timeout=10'

Alternatively, set those timeouts directly in MySQL if your host allows it.


:white_check_mark: Step 4: Backup Plan (Literally)

You’re absolutely right: if you can get a backup of your data and do a fresh install, that’s a clean solution. The built-in Settings > Import/Export > Export feature backs up:

  • Clients
  • Invoices / Quotes / Recurring
  • Payments
  • Products
  • Settings

When you restore on the fresh install, make sure you’re using the same version (5.11.62) or newer. If you do a fresh install on Laravel Vapor or a VPS later, it’ll be way smoother.


:fire: Bonus: Temporary Kill-Switch

Until this is fixed or reinstalled, try adding a PHP .htaccess rule to rate-limit how many PHP-CGI calls are made (some shared hosts support this):

<IfModule mod_fcgid.c>
  FcgidBusyTimeout 20
  MaxRequestLen 2097152
</IfModule>

Or ask your host if you can limit php-cgi concurrency with ProcessManager maxChildren=2.


:speech_balloon: Also Worth Asking Your Host

  • Can they tell you what script/process is consuming the most CPU?
  • Can they temporarily bump your wait_timeout / max_connections in MySQL?
  • Can they confirm if any PHP workers are lingering too long?

Want me to walk through your .env file to confirm settings or help with crafting the backup/restore plan line by line?

Let’s get you back to stable ground :raised_fist:

Hmm. The last thing to try here is exporting everything one at a time and then importing to the fresh install.

I’ll have to ask for another temporary bump of the resources to get that done, but it shouldn’t be a problem. Provided I actually get the stuff. I tried to export and I didn’t get some of the files for some reason. Not sure what’s going on there.

Many thanks for the help so far @hillel - it seems like I’ll have to focus on moving things to a self hosted solution if I’m to continue with v5. Even with a fresh install the resource limits are being hit. So that’s it for me for now.

Hey @khat17 , I originally wrote the “resources skyrocket” topic that you mentioned in your first post. I also upgraded from a self hosted V4 installation and I’ve had numerous performance issues with V5 that linger to this day. Most of the time, I’ve got it pretty stable, but an easy way on my installation to cause InvoiceNinja to lock up is to create a new invoice, click into the Item field to select an item, and boom, half the time the items show up in the autocomplete dropdown, the other half of the time, only the “New Product” text appears and server resource usage skyrockets and InvoiceNinja as well as every other website on that server becomes unresponsive for a minute or 2 while InvoiceNinja figures itself out before eventually showing the products (there’s less than 30, so should be fairly instant). There’s other times it’ll do this as well, but this is the scenario I come across most frequently that locks it up.

V4 was incredibly clean, performed amazingly, and had zero issues for the years I ran it. But V5 has some very frustrating performance hits and lockups, not made better by the fact that when you update the software, it’s really just unpacking the new code over top of the old code, and not getting rid of any old code, which is just asking for security problems. I raised this as a concern over the way V4 upgrades worked here, where you deleted all InvoiceNinja files except the .env file, then dropped in the new files, then ran the update URL. Who knows what kind of lingering old code in web accessible directories is causing any of these issues for V5.

1 Like

I did wonder why v5 was so much heavier than v4. It was noticeable in usage, but the latest version seems worse than what I was running before on the same shared hosting. I’m now wondering if there’s a way to revert and retain all my existing customer info. At least until v5 gets lighter.

v5 has more/newer features, so it would be best to update. My issue is the USD$60 price difference (monthly) between my current hosting plan and what it would take to run the current version. And that’s still not without some issues. The import/export option still doesn’t work.

At this point I’m looking into having dedicated hosting set up for v5 and moving my stuff just to get things running again. If it has higher resources available it should run better.

@link470 - I’ll say this much. On dedicated resources v5 is very nice. It’s more appealing to the eyes and the layout of stuff is good. The resources required though - much more than v4.

With what my setup is costing now I may leave things be - but it really would be nice to get things working properly. I guess I’ll recommend v4 to persons on a tighter budget since that runs fine on shared web hosting.