Subdomain - Internal Server Error when call api like /something

I deploy Slim 4 app to subdomain of host. It is good when call api But when call any api likes, an error occurs.

this is the code of router config

use App\Application\Actions\User\ListUsersAction;
use App\Application\Actions\User\ViewUserAction;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\App;
use Slim\Interfaces\RouteCollectorProxyInterface as Group;

return function (App $app) {
    $app->options('/{routes:.*}', function (Request $request, Response $response) {
        // CORS Pre-Flight OPTIONS Request Handler
        return $response;

    $app->get('/', function (Request $request, Response $response) {
        $response->getBody()->write('Hello world!');
        return $response;

    // $app->get('/users', function (Request $request, Response $response) {
    //         $response->getBody()->write('Hello world!');
    //         return $response;
    //     });
    $app->group('/users', function (Group $group) {
        $group->get('', ListUsersAction::class);
        $group->get('/{id}', ViewUserAction::class);
Please help me!

When I test it takes about 30 seconds. So it looks like an internal timeout. Have you checked the database connection parameters?

Thank you. But, my problem isn’t does not work with any route except root (’/’). With (’/ users’) or any routes, it return 500. In local host that fine.