yajra / laravel-oci8

Oracle DB driver for Laravel via OCI8
https://yajrabox.com/docs/laravel-oci8
MIT License
832 stars 237 forks source link

oci_rollback(): ORA-01012: not logged on #679

Closed mhelaiwa closed 2 years ago

mhelaiwa commented 3 years ago

Summary of problem or feature request

I am using laravel-oci8 to connect my laravel app to a 12c oracle db. my app is working fine but in my log files I have an error "production.ERROR: oci_rollback(): ORA-01012: not logged on"

Code snippet of problem

[2021-10-06 07:22:03] production.ERROR: oci_rollback(): ORA-01012: not logged on
Process ID: 20756
Session ID: 1592 Serial number: 62307 {"exception":"[object] (ErrorException(code: 0): oci_rollback(): ORA-01012: not logged on
Process ID: 20756
Session ID: 1592 Serial number: 62307 at /myapp/vendor/yajra/laravel-pdo-via-oci8/src/Pdo/Oci8.php:198)
[stacktrace]
#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'oci_rollback():...', '/home/diwaneser...', 198, Array)
#1 /myapp/vendor/yajra/laravel-pdo-via-oci8/src/Pdo/Oci8.php(198): oci_rollback(Resource id #488)
#2 /myapp/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(208): Yajra\\Pdo\\Oci8->rollBack()
#3 /myapp/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(189): Illuminate\\Database\\Connection->performRollBack(0)
#4 /myapp/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(74): Illuminate\\Database\\Connection->rollBack()
#5 /myapp/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(39): Illuminate\\Database\\Connection->handleTransactionException(Object(Yajra\\Pdo\\Oci8\\Exceptions\\Oci8Exception), 1, 1)
#6 /myapp/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php(197): Illuminate\\Database\\Connection->transaction(Object(Closure))
#7 /myapp/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(246): Illuminate\\Queue\\DatabaseQueue->pop('default')
#8 /myapp/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(107): Illuminate\\Queue\\Worker->getNextJob(Object(Illuminate\\Queue\\DatabaseQueue), 'default')
#9 /myapp/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(101): Illuminate\\Queue\\Worker->daemon('database', 'default', Object(Illuminate\\Queue\\WorkerOptions))
#10 /myapp/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(85): Illuminate\\Queue\\Console\\WorkCommand->runWorker('database', 'default')
#11 [internal function]: Illuminate\\Queue\\Console\\WorkCommand->handle()
#12 /myapp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#13 /myapp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#14 /myapp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#15 /myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(564): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#16 /myapp/vendor/laravel/framework/src/Illuminate/Console/Command.php(179): Illuminate\\Container\\Container->call(Array)
#17 /myapp/vendor/symfony/console/Command/Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#18 /myapp/vendor/laravel/framework/src/Illuminate/Console/Command.php(166): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#19 /myapp/vendor/symfony/console/Application.php(1009): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#20 /myapp/vendor/symfony/console/Application.php(273): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Queue\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#21 /myapp/vendor/symfony/console/Application.php(149): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#22 /myapp/vendor/laravel/framework/src/Illuminate/Console/Application.php(89): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#23 /myapp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#24 /myapp/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#25 {main}

System details

Config

[
    'driver'         => 'oracle',
    'tns'            => env('DB_TNS', ''),
    'host'           => env('DB_HOST', ''),
    'port'           => env('DB_PORT', '1521'),
    'database'       => env('DB_DATABASE', ''),
    'username'       => env('DB_USERNAME', ''),
    'password'       => env('DB_PASSWORD', ''),
    'charset'        => env('DB_CHARSET', 'AL32UTF8'),
    'prefix'         => env('DB_PREFIX', ''),
    'prefix_schema'  => env('DB_SCHEMA_PREFIX', ''),
    'server_version' => env('DB_SERVER_VERSION', '11g'),
    'options' => [
        PDO::ATTR_CASE => PDO::CASE_LOWER,
        PDO::ATTR_PERSISTENT => true
    ]
]

DB Resources

image

I think this has thing to do with pooling or session at the oracle side what should I do to solve this problem? :)

yajra commented 2 years ago

Haven't encountered a similar issue yet. Can you please provide snippets to reproduce the issue?

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 7 days since being marked as stale.