@laptop, This appears to be a bug in codeignitor. However,it also appears as if you alone are seeing this error, We are not seeing other reports of the problem.
Given that, the only way to debug this might be to catch it as it happens. I would be happy to assist but this will mean providing access to your server (for example FTP or SSH access).
Please feel free to PM me here or on slack if you wish to proceed with this course of action.
I am able to see where a possible issue might be occurring, but I am unable to reproduce the problem locally. I suppose it is just the way my local data is set up. Let me work with it some more until I can force a crash on my local system.
Maybe filling the system with several thousand records will help, because no other changes have been made before the bug occurred. Thanks for your help!
You are spot on here. The issue relates back to a query that searches the allocation of clients to a guest user. Because you have over 5000 records, it builds a mammoth query - something like
.. WHERE client_id = 2 OR client_id = 6 OR client_id = 11 OR client_id = 12 OR ...
(If you can imagine that query extending out over 5000 clients you will get the picture.)
This is not handled well in the Codeignitor framework.
I will log a fix request during this weekend and seek an alternate way of writing the query and provide a fix soon,
This is no major Fix,
Noone beside you encountered this issue.
If it is important for you feel free to help to develop a fix and implement it to IP.
As IP is a free service noone gets paid here and noone have to right of a quick fix.
Wait for the next version which will include a lot of fixed already and hope a fix for your problem is included.
On the other side:
if you have about 5.000 customer you probably earn a lot of money. If you cant wait hire a dev who will fork IP, then develop a fix, make a Pull-Request and implement this Fix to IP to make it updateable.
/home/ideatrad/public_html/invoice/application/modules/clients/controllers/Clients.php
Probably in that file, but those numbers of those client_id’s are really important.
When we use IN() the query will not be that big, so it will be ok.
All those OR is making the query big