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.