1 (edited by DrCard 06/19/2025 08:14:57 am)

Topic: GL Inquiry can't show one year of data

When I try query one year using the gl inquiry in my database using one of my accounts which have ~16000 transaction in 2024 the page stuck like what shown in the picture at the attachment and no result given.

How can I let FA give me the result I'm running FA in server with 8GB of ram using RHEL 9 based distro using nginx and php 8.3.

Post's attachments

mkf.png 45.6 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

2 (edited by DrCard 06/19/2025 08:16:12 am)

Re: GL Inquiry can't show one year of data

Can pagination be implemented with this page?

Re: GL Inquiry can't show one year of data

Increase the number of max_input_vars in the php.ini apart from max memory size.

Re: GL Inquiry can't show one year of data

I tried to increase the limits as you said and even set the memory limit to something big such as memory_limit = 4G or 6G which I think is way too much what if there is page leaking it might hang my server.

Anyway after increasing the limit I got 10 month to work by 11+ months doesn't work.

Re: GL Inquiry can't show one year of data

Restart webserver if php.ini settings were changed.
Optimise your database and introduce some indexes for certain fields used in the report query.
export out your database and recreate it by importing it into a new structure.

6 (edited by DrCard 08/03/2025 09:33:42 am)

Re: GL Inquiry can't show one year of data

I have a testing server that I can give you access in and you can see and debug the problem could you message me in private to see the issue as the problem is still and not fixed by the configuration that you give me and this face any frontaccounting installation with big data.

Re: GL Inquiry can't show one year of data

A lack of indices on some fields of some tables - that only speeds up processing.
If the output is because of having a single output buffer for a very large amount of data that needs to be streamed, then a file capture of the output can be implemented. @joe: any ideas?

Are you using any extensions?
Just take a full compressed backup (delete the data from the users table in the backup) from within FA and upload it somewhere and send me a PM and indicate it here.
What versions of PHP / MySQL are you using?

Re: GL Inquiry can't show one year of data

@apmuthu

I sent you a database backup as requested in PM.

We only use SimpleAPI extension.

Re: GL Inquiry can't show one year of data

There is the Slim PHP micro framework - v2.64 has been tested.
SimpleAPI extension available at https://github.com/andresamayadiaz/FrontAccountingSimpleAPI ?
https://www.frontaccounting.com/fawiki/index.php?n=Devel.SimpleAPIModule
Is this the one you are using?

Re: GL Inquiry can't show one year of data

Check PM to verify GL data
What steps do you want to verify for size?

Checked out 01-01-2024 to 31-08-2024 in GL Inquiry for 1060 account and it works fine in 10 to 12 seconds.
When we go upto 30-09-2024 (ie., one more month) it times out in 12 seconds.
This did not change with memory_limit from 128M to 4G.
Looks like some script timeout or keepalive or session issue.

Re: GL Inquiry can't show one year of data

Solved. Increases the Ajax timeout to 20 seconds.
Ref: https://frontaccounting.com/punbb/viewtopic.php?pid=5318#p5318
The default is 10 seconds (10000 milliseconds) in js/utils.js lines 36 to 42:

JsHttpRequest.request= function(trigger, form, tout) {
//    if (trigger.type=='submit' && !validate(trigger)) return false;
    tout = tout || 10000;    // default timeout value
    document.getElementById('msgbox').innerHTML='';
    set_mark(tout>10000 ? 'progressbar.gif' : 'ajax-loader.gif');
    JsHttpRequest._request(trigger, form, tout, 0);
};

Replacing 10000 to say 20000 or more in the two places above will do the job.
Logout of FA. Close the browser. Clear the cache and then login to get longer ajax queries of inquiry and reports.

This has been Wiki-ed.

@joe / @itronics: can we make this a setting in the config.php?

Re: GL Inquiry can't show one year of data

Thank you @apmuthu your solution works.