devnyxie
devnyxie
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
thanks @Brody for believing in me 🙏🏻
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
Fix: 1. Delete deployment from your project 2. Click add domain again, and this time nginx's php-fpm will prompt you for a port, and suggest port of your PHP app 🪄
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
any help apart from being sure that my code is bad tho? :MattCool: I've commented out all of my code, simply returning "hello world" and nothing works either. Project specific settings are all default too.
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
:hmm: well
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
It works on another platform.
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
@Brody :blob_help:
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
@Brody I've pushed error-handling update, featuring logging and error handling for the root route. Nothing works, but I've got a "type" of log: 2024/06/24 16:02:26 [error] 55#55: *9 open() "/app/"" failed (2: No such file or directory), client: 192.168.63.241, server: localhost, request: "GET /%22 HTTP/1.1", host: "betterstack-project-production-7fea.up.railway.app" It's trying to access app dir, and for some reason it does not even exist?
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
ok.
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
All I'm trying to say, is, I would see the log if the configuration was right and by going to "https://betterstack-project-production-7fea.up.railway.app/" I would be accessing the application. But I'm not. And I just want to learn what should I even do.
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
It's a very very simple application, nothing can be broken here, literally
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
No description
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
@Brody I've tried to push one fix with V2, and it was building for over 10 minutes. Removed it, switched to Legacy, there are only Nginx related logs again :notstonks:
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
I've updated the project to PHP 8.3.8.
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
Yeah. Should I change to legacy?
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
No description
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
I've tried to co create custom nginx.template.conf, but again nothing worked:
worker_processes 5;
daemon off;

worker_rlimit_nofile 8192;

events {
worker_connections 4096; # Default: 1024
}

http {
include $!{nginx}/conf/mime.types;
index index.html index.htm index.php;

default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout;
error_log /dev/stdout;
sendfile on;
tcp_nopush on;
server_names_hash_bucket_size 128; # this seems to be required for some vhosts

server {
listen ${PORT};
listen [::]:${PORT};
server_name localhost;

$if(NIXPACKS_PHP_ROOT_DIR) (
root ${NIXPACKS_PHP_ROOT_DIR};
) else (
root /app;
)

add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";

index index.php;

charset utf-8;

location / {
try_files $uri $uri/ /index.php?$query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }

$if(IS_LARAVEL) (
error_page 404 /index.php;
) else ()

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include $!{nginx}/conf/fastcgi_params;
include $!{nginx}/conf/fastcgi.conf;
}

location ~ /\.(?!well-known).* {
deny all;
}
}
}
worker_processes 5;
daemon off;

worker_rlimit_nofile 8192;

events {
worker_connections 4096; # Default: 1024
}

http {
include $!{nginx}/conf/mime.types;
index index.html index.htm index.php;

default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout;
error_log /dev/stdout;
sendfile on;
tcp_nopush on;
server_names_hash_bucket_size 128; # this seems to be required for some vhosts

server {
listen ${PORT};
listen [::]:${PORT};
server_name localhost;

$if(NIXPACKS_PHP_ROOT_DIR) (
root ${NIXPACKS_PHP_ROOT_DIR};
) else (
root /app;
)

add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";

index index.php;

charset utf-8;

location / {
try_files $uri $uri/ /index.php?$query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }

$if(IS_LARAVEL) (
error_page 404 /index.php;
) else ()

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include $!{nginx}/conf/fastcgi_params;
include $!{nginx}/conf/fastcgi.conf;
}

location ~ /\.(?!well-known).* {
deny all;
}
}
}
30 replies
RRailway
Created by devnyxie on 6/24/2024 in #✋|help
PHP: 504 Time-out
e3e3275b-dd08-457b-83d6-d3c46e4fddd6
30 replies
RRailway
Created by devnyxie on 1/28/2024 in #✋|help
docker-compose: Is it still not supported?
I see.. okay, thanks! see you around <:bc_8bithearts:989307937191256095>
11 replies
RRailway
Created by devnyxie on 1/28/2024 in #✋|help
docker-compose: Is it still not supported?
<:bc_catcry:984470554906079273> oh.. Thanks! Maybe we have any workarounds or analogues? <:Unwn_Chat_jmyak:1188938778212053043>
11 replies
RRailway
Created by devnyxie on 1/28/2024 in #✋|help
docker-compose: Is it still not supported?
b7d9cf7e-41b7-4cf2-9164-e00d2a500379
11 replies