I am trying to run a function in IIS - Laravel which takes about 3mins.
I just don't know why Laravel return 500.
Although I tried add the construct below
public function __construct()
{
set_time_limit(2000);
}
When I run this function still get 500 without any error.
public function import(Request $request)
{
try {
sleep(300);
return '123';
} catch (\Exception $e) {
dd($e);
}
}
Can someone tell me how fix this error?