When I upload CSV file in symfony2 with 10000 records it gets error "Maximum execution time of 300 seconds exceeded".
            Asked
            
        
        
            Active
            
        
            Viewed 596 times
        
    -5
            
            
        - 
                    1Increase maximum execution time in `php.ini` – ajaykumartak May 05 '15 at 13:30
 - 
                    Or, speed up whatever you are doing. 10K records ought generally to load faster than 300 seconds. – halfer May 05 '15 at 13:37
 - 
                    use `set_time_limit(0);` in your controller class – Matteo May 05 '15 at 13:40
 - 
                    1possible duplicate of [Fatal error: Maximum execution time of 30 seconds exceeded](http://stackoverflow.com/questions/5164930/fatal-error-maximum-execution-time-of-30-seconds-exceeded) – Michael Sivolobov May 05 '15 at 14:02
 - 
                    I used set_time_limit(0), still gets same error for timeout. – Chiku May 13 '15 at 06:44
 
2 Answers
2
            
            
        You can increase maximum execution time on your php.ini as said before. You can also split your files into smaller, lighter files and process them separately.
        jde
        
- 198
 - 9
 
0
            
            
        For bypass the the php.ini configuration you can set in your controller method the line:
public function verySlowerAction()
{
        set_time_limit(0);
....
}
        Matteo
        
- 37,680
 - 11
 - 100
 - 115