Comments (3)
Stack traces
SetTransactionIsolationLevel.php:41, OC\DB\SetTransactionIsolationLevel->postConnect()
EventManager.php:43, Doctrine\Common\EventManager->dispatchEvent()
PrimaryReadReplicaConnection.php:211, Doctrine\DBAL\Connections\PrimaryReadReplicaConnection->performConnect()
PrimaryReadReplicaConnection.php:155, Doctrine\DBAL\Connections\PrimaryReadReplicaConnection->connect()
Connection.php:150, OC\DB\Connection->connect()
Connection.php:453, Doctrine\DBAL\Connection->getDatabasePlatformVersion()
Connection.php:411, Doctrine\DBAL\Connection->detectDatabasePlatform()
Connection.php:318, Doctrine\DBAL\Connection->getDatabasePlatform()
ConnectionAdapter.php:200, OC\DB\ConnectionAdapter->getDatabasePlatform()
QueryBuilder.php:121, OC\DB\QueryBuilder\QueryBuilder->expr()
AppConfig.php:1239, OC\AppConfig->loadConfig()
AppConfig.php:264, OC\AppConfig->searchValues()
AppConfig.php:1380, OC\AppConfig->getValues()
AppManager.php:131, OC\App\AppManager->getInstalledAppsValues()
AppManager.php:152, OC\App\AppManager->getInstalledApps()
OC_App.php:234, OC_App::getEnabledApps()
Coordinator.php:90, OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
base.php:706, OC::init()
base.php:1181, require_once()
v1.php:31, {main}()
SetTransactionIsolationLevel.php:41, OC\DB\SetTransactionIsolationLevel->postConnect()
EventManager.php:43, Doctrine\Common\EventManager->dispatchEvent()
PrimaryReadReplicaConnection.php:211, Doctrine\DBAL\Connections\PrimaryReadReplicaConnection->performConnect()
PrimaryReadReplicaConnection.php:224, Doctrine\DBAL\Connections\PrimaryReadReplicaConnection->ensureConnectedToPrimary()
PrimaryReadReplicaConnection.php:290, Doctrine\DBAL\Connections\PrimaryReadReplicaConnection->executeStatement()
Connection.php:361, OC\DB\Connection->executeStatement()
QueryBuilder.php:393, Doctrine\DBAL\Query\QueryBuilder->execute()
QueryBuilder.php:280, OC\DB\QueryBuilder\QueryBuilder->execute()
QueryBuilder.php:326, OC\DB\QueryBuilder\QueryBuilder->executeStatement()
AllConfig.php:283, OC\AllConfig->setUserValue()
User.php:259, OC\User\User->updateLastLoginTimestamp()
Session.php:399, OC\User\Session->completeLogin()
Session.php:643, OC\User\Session->loginWithPassword()
Session.php:366, OC\User\Session->login()
Session.php:463, OC\User\Session->logClientIn()
Session.php:602, OC\User\Session->tryBasicAuthLogin()
base.php:1135, OC::handleLogin()
v1.php:63, {main}()
so it's the Doctrine primary/replica connection class that switches to the primary once we start a transaction. The class doesn't factor in that we only have primary and no replica and still opens a separate connection.
We set the primary parameters as the first replica if there is no replica config. Doctrine requires this for the Primary/Replica class, else it throws Uncaught InvalidArgumentException: You have to configure at least one replica. in nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php:117
.
from server.
I think the best fix would be to only subclass PrimaryReadReplicaConnection when db replicas are actually available and use the simple Doctrine Connection instead.
from server.
Good finding 👍
from server.
Related Issues (20)
- [Bug]: Inconsistency in date format in placeholder
- [Bug]: The database keeps growing after upgrade to 29.0.0 HOT 3
- [Bug]: wrong directory for temporary PHP path (nc 28.0.5 and 29 / php-fpm) HOT 5
- [Bug]: Upgrade to 28.0.5 broken my nextcloud
- [Bug]: Upgrade to 29.0.0 leads to "General error: 1709 Index column size too large. The maximum column size is 767 bytes" HOT 5
- Details tab not closing / shows details for previous folder selected when browsing to another location
- [Bug]: Exception: Database error when running migration for app dav HOT 2
- [Bug]: last job timestamp localization wrong HOT 1
- Update devcontainer PHP environment to PHP 8.3
- [Bug]: Nextcloud 28.0.5 Upgrade - Fail post Install - Unable to load Composer Autoload related file HOT 5
- [Bug]: Cron job fails since update to 29.0.0 HOT 7
- [Bug]: Wrong user quota HOT 2
- [Bug]: occ config:list system does not redact trusted_domains and overwrite.cli.url
- [Bug]: From Name is not setting properly in Calendar invitations created from Thunderbird HOT 7
- [Bug]: Nextcloud Hub 8, copying files to Object Storage configured as Primary Storage isn't reliable HOT 4
- [Bug]: Unable to update background task execution mode HOT 1
- Check/Uncheck button to install specific recommended app from "/apps/recommended" page HOT 2
- [Bug]: 'Data directory protected' check failing HOT 5
- [Bug]: Session blocked when a user changes their password to one that is too long
- [Bug]: ConnectionFactory::getConnection parameters messed up by switch to PrimaryReadReplicaConnection HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.