Hi,
I would like to ask for help regarding the ORA-12154 error we encounter.
This happens not always, but at random times.
Our Environment is we are using PHP OCI8 (via Symfony framework dbal/doctrine) to connect to the OracleDB. and we have set up the TNS_ADMIN for tnsnames.ora, in Apache and PHP env (here is the location /usr/lib/oracle/21/client64/network/admin, from checking via phpinfo this is correctly set up as this shows in the details of environment vars)
Again, this only happens at a random time (2 or 3 times in a month). but if this happens, the ORA-12154 average occurrences for a day are around 100+
What we have checked and verified.
- If using sqlplus and issuing a query. no ORA-12154 errors, it will connect and runs the query without any problem (even if the Symfony dev.log still continues to receive this error).
- When we do, a stop/start of Apache to kill any php session. this solves the problem temporarily. but it might take a week and it will happen again.
So far, our adjustments are the following:
- update config/packages/doctrine.yaml (inserted dbname and servicename. as we assume the code probably had
- upgraded the apache to latest / oracle client / php version / php-oci extension
- updated php.ini memory limit (just in-case if this is related to any memory issue)
even though this is updated we still have this ORA-12154 error until now.
Environment-specific details:
Web server (EC2)
Amazon Linux 2
Apache/2.4.53
PHP 7.4.30 (with php-oci8-7.4.30)
oracle-instantclient-basic-21.6
oracle-instantclient-devel-21.6
oracle-instantclient-sqlplus-21.6
Symfony Framework 5.4
Database server
OracleDB Database Server 19c EE (ExaCS)
Any help is appreciated. Thanks