How to modify the query limit in Cases?

When i search in Cases and filtered Date Created is equal to 1 day. It gives me this error =>

HTTP: 500 Internal Server Error

Unknown error.

Then i created a file to override the config.php into config_override.php =>

<?php
/***CONFIGURATOR***/
$sugar_config['max_record_fetch_size'] = 2000;

since when i query it to MySQL it gives me 1,300+ rows. But still having the same error.

I then also added

$sugar_config['resource_management']['special_query_modules'][] = 'Cases';
$sugar_config['resource_management']['special_query_limit'] = 0;

still getting the same error.

I did Quick Repair and Rebuild everytime i do changes. Since i cannot do Rebuild Config File because it gives me this error when i click Rebuild => The config.php could not be rebuilt.

Can someone help me get through this?

Afterwards, i would like to fetch a month term query. In my SQL it gives me 45,000+ rows. What is the safe mac value to fetch?

Would this overriding fetch max value can possibly cause a slow performance in CRM?

Thanks in advance.

  • i tried below

    $sugar_config['max_record_fetch_size']=1200;
    

    and it gets through, beyond that its a Request timeout error.

  • i also forcely edit the config.php max_record_fetch_size=1500 then it gives me this

    There are more than 1200 records in the result set. You have selected the first 1200 records. Clear selections.

    Hmm 1200 is the limit?

  • Hmm. I was thinking changing the value of this parameter,will help us.But it didnt ,it seems.I am not aware of there is limit upto 1200.can you make sure value once again in your config_override.php/config.php

  • Hi Ajay,

    I guess our network having issues, maybe the Quick Repair was done before my winscp completed the transfer of file so the edited config_overrride didnt load. I now get Request Timeout Error after ensuring that the file was uploaded then did Quick Repair.

  • Hmm.You should take care of max_execution_time according to how many records you are trying to fetch.You need to make adjustment on both.If you are increasing no of records,then you need to increase max_exection_time as well.If you are decreasing ,then you need to decrease.

  • max_execution_time=3600; is not enough? hmm il try to observe on changes on this. il try to vary it

  • the fetch always gets aborted at 3 min and 4 sec then it prompts Request Timeout. The request has timed out.

    anyone can help me get through this?

  • I already got the solution :-) in exporting large amount data and selecting all the records in the search. Here is my config_override.php

    $sugar_config['resource_management']['special_query_modules'][] = 'Cases'; 

    $sugar_config['resource_management']['special_query_limit'] = 70000;

    $sugar_config['resource_management']['default_limit'] = 50000;

    $sugar_config['max_record_fetch_size']= 70000;

    $sugar_config['api']['timeout'] = 8000;  // more than 2 hours

    after overriding the php.ini 'max_execution_time=30' at your desired amount of time, you will be stuck to Request Timeout. The request has timed out. API timeout by default is 180s (3min). so override it using $sugar_config['api']['timeout']

    Regards,

    Longki Dela Cruz

1 2 3