On server i am trying clear cache but after run this command (php bin/console cache:clear --env=prod) a get error:
[Doctrine\DBAL\Exception\ConnectionException]
An exception occured in driver: SQLSTATE[HY000] [2002] Connection timed out
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000] [2002] Connection timed out
[PDOException]
SQLSTATE[HY000] [2002] Connection timed out
Database credentials are in parameters.yaml and connection to db is working... Whole web is working...
Can anybody give me some hints/direction? Thx.
Try deleting the cache manually, see if that solves the issue.It should be
rm -rf var/cache/prod
Also try connecting to the database from your prod, through console to make sure there is nothing wrong with connectivity.
Thanks!
Related
My last build failed with this error message:
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!!
!! In ExceptionConverter.php line 117:
!!
!! An exception occurred in the driver: SQLSTATE[HY000] [1226] User 'xxxxxxxx
!! xxxxx' has exceeded the 'max_user_connections' resource (current value: 15)
And when I try to connect to my database via CLI,
mysql -u xxxxxxxxxx -pxxxxxxxx -h us-cdbr-east-xxx.cleardb.com
I am getting this error message:
ERROR 1040 (HY000): Too many connections
The problem is that the dashboard of the database says : No connections are currently established to the database. Therefore, I guess that a hidden process might be running.
Do you have an idea on how to fix this issue? I have already restarted all the dynos but it didn't have any effect. Is restarting the dynos and restarting the app the same? I also read that I should stop background workers, but I have no clue on how to do this...
I have a pimcore (6.8) setup in our local system with apache2, php7.4 with all permission, mysql (8) ubuntu from a live site for version upgrade. This website is working with live but not working in our local system. When i login to the admin panel with this website locally. Then working perfectly. But when I open any page in frontend then it shows
"Oops ... Sorry, the page you're looking for has gone."
And showing in dashboard when load any document but data in showing
Timestamp: Mon Dec 05 2022 15:00:45 GMT+0530 (India Standard Time)
Status: 500 | Internal Server Error
URL: /admin/customermanagementframework/segment-assignment/inheritable-segments?id=65&type=document&_dc=1670232645843
Method: GET
Message: Database error, see logs for details
Logs Details-
Syntax error or access violation: 1305 FUNCTION db_name.PLUGIN_CMF_COLLECT_OBJECT_SEGMENT_ASSIGNMENTS does not exist in
Now i have changed the DB version as live website now showing this error
[2022-12-09 01:34:45] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Lock\Exception\LockAcquiringException: "Failed to acquire the "Pimcore\Routing\RedirectHandler" lock." at /var/www/html/blackbusinessatlas/vendor/symfony/symfony/src/Symfony/Component/Lock/Lock.php line 119 {"exception":"[object] (Symfony\Component\Lock\Exception\LockAcquiringException(code: 0): Failed to acquire the "Pimcore\Routing\RedirectHandler" lock. at /var/www/html/blackbusinessatlas/vendor/symfony/symfony/src/Symfony/Component/Lock/Lock.php:119, Doctrine\DBAL\Exception\ConnectionException(code: 0): An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory at /var/www/html/blackbusinessatlas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:97, Doctrine\DBAL\Driver\PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /var/www/html/blackbusinessatlas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31, PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /var/www/html/blackbusinessatlas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27)"} []
Here is my .env file where you specify the credentials:
###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=mysql://myusername:mypassword#rdsservername.ccjd7fkj4brb.us-east-1.rds.amazonaws.com:3306/databasename
###< doctrine/doctrine-bundle ###
It's weird because using the username/password/server/database name credentials I can connect via HeidiSQL no problem, but when I run it through Symfony I get the following message in the log file:
[2019-04-19 18:34:20] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\ConnectionException: "An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'myusername'#'10.0.0.206' (using password: YES)" at /var/www/vhosts/mywebsite.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 93 {"exception":"[object] (Doctrine\\DBAL\\Exception\\ConnectionException(code: 0): An exception occurred in driver: SQLSTATE[HY000]
[1045] Access denied for user 'myusername'#'10.0.0.206' (using password: YES) at /var/www/vhosts/mywebsite.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:93, Doctrine\\DBAL\\Driver\\PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'myusername'#'10.0.0.206' (using password: YES) at /var/www/vhosts/mywebsite.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31, PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'myusername'#'10.0.0.206' (using password: YES) at /var/www/vhosts/mywebsite.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27)"} []
Would anyone know why the same credentials would work perfectly fine when I connect to the RDS server from home using a program like Heidi, but they won't work from within Symfony on my EC2 server?
Getting the following error when running any salt job:
[ERROR ] Salt request timed out. If this error persists, worker_threads may need to be increased.
Failed to authenticate, is this user permitted to execute commands?
Seeing the error after waiting many minutes. Restarting salt didn't help.
Unfortunately I forgot to look in the /var/log/salt/master log file which had the answer in it...
IOError: [Errno 28] No space left on device
2016-09-27 16:18:48,266 [salt.master ][ERROR ] Exception [Errno 28] No space left on device occurred in file server update
So, I had simply run out of disk space.
Recently I started working with Symfony. I created a project with the terminal/composer under the name "symfony" and also created a database on phpmyadmin (MAMP) which I called "symfony". I installed the project, and except a error of my timezone, my project was succesfully created and was running at my localhost.
After that I created a bundle called "SymfonyCinemaBundle" and my bundle was generated succesfully. I also tried to generate a entity but that is not working for me, and also the problem. After I open up the generator with the command, It asks for a shortcut name and I tried to use "SymfonyCinemaBundle:Movie" but that isn't working and gives me the following error:
*The Entity shortcut name: SymfonyCinemaBundle:Movie
[Doctrine\DBAL\Exception\ConnectionException]
An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000] [2002] Connection refused
[PDOException]
SQLSTATE[HY000] [2002] Connection refused
doctrine:generate:entity [--entity ENTITY] [--fields FIELDS] [--format FORMAT] [--with-repository]*
I checked my parameters.yml but thats seems to be right. I've looked on the internet but nothing seems to help unfortunately. Does anyone has a solution for me?
Note: I'm using MAMP. The difference between normal and developers mode has no difference.
Solved:
I've changed the host in parameters.yml to localhost instead of 127.0.0.1. I also added the right port number (normally it doesn't matter) and that solves the problem but has given me another error instead: "No such file or directy". It had to do with my mysql.sock so I used the following commands in my terminal:
sudo mkdir /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
sudo chown _mysql /var/mysql/mysql.sock
sudo chmod 777 /var/mysql/mysql.sock