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.

Parents
  • Hi Longki,

    The special_query_limit configuration value is for situations where loading a page causes more than 1,000 queries to be run. This is different than a query returning over 1,000 results. Since you are getting a 500 error when you try that filter, please check your PHP error log and see if there are any error messages that might help you debug the root cause of this issue. Feel free to share the error message here and I'll try to help you narrow down the root cause. I hope that helps!

    -Alan

Reply
  • Hi Longki,

    The special_query_limit configuration value is for situations where loading a page causes more than 1,000 queries to be run. This is different than a query returning over 1,000 results. Since you are getting a 500 error when you try that filter, please check your PHP error log and see if there are any error messages that might help you debug the root cause of this issue. Feel free to share the error message here and I'll try to help you narrow down the root cause. I hope that helps!

    -Alan

Children
  • Its already saturday here in my timezone, i could get back to my computer at the office on monday. Can i ask what file is running when i hit [Select All] from the prompt that says [You have selected all 20 records in this view. Select all records in the result set.] when i tick the checkbox to select all?

  • [Mon Jan 25 02:26:28 2016] [error] [client xxx.xx.xx.xxx] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in ../SugarEnt761/data/SugarBean.php on line 3363,

  • 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