Sylius: 504 Gateway Time-out on dev environment with Standard-Edition - php

I've followed the installation steps here: http://docs.sylius.org/en/latest/book/installation.html
Everything it's ok until I don't try to access the /app_dev.php.
I'm running it on Vagrant v1.8.1 with a Ubuntu 14.04 box, memory=1024 and cpus=2. The physical host is a MacbookPro 10.11.3 (i5 2.7 GHz, Ram 8 Gb).
Even tried to install apcu extension and changing the memory_limit in php.ini file to 512 Mb but nothing changes.
Nginx logs says:
2016/03/16 11:31:06 [error] 1292#0: *1 upstream timed out (110:
Connection timed out) while reading response header from upstream,
client: 192.168.10.1, server: test.dev, request: "GET /app_dev.php/
HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "test.dev",
referrer: "http://test.dev/app_dev.php/login"
The application log doesn't show any error. Also tried to reprovision the vm and install Sylius from start but I get always the same behavior.
I think it's related to the host configuration but don't know where to start.

After many attempt with different box configuration I finally managed to make Sylius working. Just removed and reinstalled plugin vagrant-bindfs.
It's still really slow and use much memory (about 60MB), I will dig more on NFS configuration for Vagrant-OSX and then I will update this answer.

Related

Valet: 502 bad gateway when running test.dev on a mac, laravel, php install

I installed locally php71 with fpm on a mac.
Then got valet working when going to 'ping anyting.dev'.
Then went into directory 'PHP_Apps' where I have all my php apps installed and ran 'valet park' in that directory. Inside it I created a 'test' directory containing an index.php file.
Going in the browser to index.dev displays:
502 Bad Gateway nginx/1.10.2
Also the log file records:
2017/01/31 16:58:48 [crit] 285#0: *16 connect() to
unix:/Users/ME/.valet/valet.sock failed (2: No such file or directory)
while connecting to upstream, client: 127.0.0.1, server: , request:
"GET /favicon.ico HTTP/1.1", upstream:
"fastcgi://unix:/Users/ME/.valet/valet.sock:", host: "test.dev",
referrer: "http://test.dev/"
Does the same when pointing to laravel install dirs.
I'm unfamiliar with nginx. What is the file it doesn't find exactly ?
And how to resolve this problem ?
EDIT: I don't have a valet.sock file, that might be the problem but I don't know what to put inside.
Try to run valet install again, it might have something wrong with the configuration.

RIAK php client timeout error

My environment is Ubuntu 14.04LTS, Nginx 1.4.6 with php5-fpm.
I have a code with RIAK php api ( riak-pb ). When i run it in browser, it works well ( in this case FetchObject ).
I click the browser refresh button more time and my sample code runs well as expected: echoes the FetchedObject. But for examle i wait ( randomly ) few minutes and i want to run my code again, it fails with 504 Gateway time-out.
At this moment no one php code can run at my host.
My NGINX log:
[error] 8491#0: *20 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: , request: "GET /getContent.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "localhost"
I realized my php-fpm has some error but no log about it.
A sudo service php5-fpm restart command can solve it immediately ( or wait few minutes again ). But i can cause this error again anytime. Sometimes immediately, sometimes after a long trying.
Pls help me.
Update:
I've updated my NGINX to version 1.10.0 but nothing changed.

Raspbian owncloud nginx [error] 2667#0: *4 connect() failed (111: Connection refused) while connecting to upstream

I am using a Raspberry pi to host a owncloud server. It uses nginx, and when I configured the pi with this tutorial, the page came up with a 502 Bad Gateway error. I checked the logs and found this:
2015/10/22 05:18:03 [error] 2667#0: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.101, server: 192.168.1.102, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.102", referrer: "https://192.168.1.102/"
EDIT: Nevermind this question anymore, I have moved on to using a different platform. However, I am still urious as to what this problem is.
I tried to fix it with several other solutions found in posts on this site like here and here, as well as ensuring that php was installed, but none worked. I am stumped as I am a relative newbie to linux and know nothing about nginx. Any help is appreciated. Thanks in advance.
The php-fpm is not running. You should run the php-fpm.
If you has add the php-fpm as a service : service php-fpm restart
Or {PHP_PATH}/sbin/php-fpm {PHP_PATH} is the --with-prefix=/path/ when you ./configure the php

PHP-FPM Xdebug causes SIGSEGV

Enabling Xdebug on nginx server with php-fpm causes SIGSEGV error logged in /var/log/nginx/error.log:
2015/07/26 20:30:37 [error] 28452#28452: *326 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.50.1, server: mydomain.dev, request: "POST /admin/soap/add/95 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "mydomain.dev", referrer: "http://mydomain.dev/admin/soap/add/95"
When I disable Xdebug errors are gone.
Script which is causing this error sends SOAP request to the external service.
In my opinion this might be some kind of buggy configuration e.g. exceeding max connection number or something like this, but I have no idea how to find it.
The server which I'm working on is Vagrant box https://github.com/Varying-Vagrant-Vagrants/VVV.

phpMyadmin error 2002 LEMP Stack

I'm using a RedHat Linux Web and DB server. Have PHPMyadmin 4.0.10.2-2 installed on web server w/ PHP 5.3.3 and Nginx 1.4.4. Connecting to the db server, Percona 5.5.32.
I can't log into PHPMyAdmin with mysql credentials anymore. BUT I can log in to mysql via cli and mysql workbench with those credentials.
Modified my /etc/phpMyAdmin/config.inc.php to point to the db server which reside on the same subnet. Also specified the root user and other use within this file. Confirmed I could still ping servers and access mysql via web server.
Restarted all services.
Did look in the error logs (/var/log/nginx/phpMyAdmin/error.log) and get this... "2014/09/25 18:36:48 [error] 6457#0: *543 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 67.136.101.122, server: phpmyadmin.domain.com, request: "GET /index.php?token=4086842d92d66bb2f971ef2228c29acf HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "phpmyadmin.domain.com", referrer: "https://phpmyadmin.domain.com/index.php?token=4086842d92d66bb2f971ef2228c29acf"
Things were working just fine yesterday. Did an yum update this morning, which is the last change to the server.
Found the resolution. After many hours, the /etc/phpMyAdmin directory group permission had to be set to nginx.

Categories