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.

  • Ok.Now you can change that 30 to 1000 like below

    max_execution_time = 1000
    and restart your apache once.Then check once.

  • do you know the file running on the Select All button so that i can insert set_time_limit()?
    im hesitant to change the php.ini as our dev server also holds the exact copy of our projects/clients, it may cause server overload, or performance issue.

  • I am sure that list view controller is clients/base/views/recordlist/recordlist.js.I believe this will be calling recordlistapi.php.

    You can find this in sugarcrm/clients/base/api/RecordListApi.php.Try extending that to custom and add your time limit to that file,then check once.

    Will see any luck or not?

  • While in general I would also recommend to increase the max_execution time at least to 180 ( Might also be the same problem when importing / uploading / running large reports ), searching in the list view for 30+ seconds seems too long.

    Could you create a MySQL INDEX on the date_created column in cases to see if that improves the search times?

  • i extended the class RecordListApi in my and inserted set_time_limit(0) in the function recordListGet($api, $args)
    but still i got the same error, Max execution time of 30 seconds exceeded ..

    have i done it correctly? or should i put it in js instead?

  • @ ajay: i already have done this. set to 3600 secs as per granted by our team leader. but still when it prompts

    There are more than 1000 records in the result set. You have selected the first 1000 records.

    Is there a way to select more than 1000 results?

  • Try changing the value of "max_record_fetch_size" this parameter in config_override.php.

    similar like

    $sugar_config['max_record_fetch_size']=1500; //your value
    

    Note: If we increasing value of this parameter,this will take little more time to fetch according to value.So you need to consider that also(i meant max execution time in php.ini).

  • i already set the max_execution_timelimit = 3600

    and here is my config_override.php

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

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

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

    $sugar_config['max_record_fetch_size']= 5000;

    i am querying a sample size of 1.5k cases but it prompts me an error of Request timeout, no error in logs.

    where did it went wrong Ajay Kumar ? :-( pls help

  • Ajay Kumar - its Centos 6.5

    I tried

    $sugar_config['max_record_fetch_size']=1200;
    

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

1 2 3