Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

4

"Database is being accessed by other users" error when trying to duplicate.

By
mel
on 12/7/13, 10:41 AM 5,429 views

I tried to duplicate a DEV database. But it returns the following error. However, I can do a backup and a restore and it would work. Would appreciate any help.

OperationalError: source database "DEV" is being accessed by other users DETAIL: There are 16 other sessions using the database.

I'm having the same issue here. I've been having to restore from a backup instead. I've tried restarting the server, etc, with no avail.

Gary Dunnaway
on 2/5/14, 3:12 AM

same problem here with odoo - v8 - in a clean environement, where only an admin exists as a user and nobody is logged in at the moment. So why are there always 20 or even more processes accessing a clean database with nobody logged in? Is this a disired behavior? I hope not! Which sense makes the function to duplicate otherwise?

Peter Nietz
on 9/24/14, 7:41 AM
1
Frank Adler
On 9/14/14, 10:11 PM

As I mentioned in my comment to Shiva, with v8 stopping an operational eCommerce site is probably not desirable.

The simple workaround without any postgres knowledge is to:

  1. go to URL <your.website>/web/database/manager
  2. From here create a backup of you database.
  3. Restore the database by giving it a 'New database name' and selecting "Copy of an existing database" for the mode.

Depending on the size of your db and internet connection the upload may be a slow process, but at least you get around shutting your server down.

Hope it helps someone.
Frank

0
Mind And Go
On 9/10/16, 4:22 AM

Hi,

I already had this, the point is that the option workers > 0 in the conf file could cause this kind of troubles.

If possible, change temporarily this option in the conf file with setting workers=0, restart odoo, make your backup/restore, reset the workers to its original value and restart Odoo

0
Shiva Napoleon
On 3/6/14, 4:47 AM

Try this - (assuming that you are in Linux environment) 1) Stop your erp server /etc/init.d/openerp-server stop

2) Check if there are any openerp processes still runnning ps -eaf | grep openerp

Even after stopping, if there are openerp processes, it means the previous server restarts did not kill the old processes. 3) If there are any hanging openerp processes still, note down the process numbers and kill them one by one: kill abcd

4) After killing all openerp processes, restart the server /etc/init.d/openerp-server start

Now check the duplication process. Hope it works.

Hi Shiva, The process you describe would certainly work, however with v8 we're now talking about shutting down an operational eCommerce site in mid flight. I'd assume customers would loose there session, shopping carts etc and then get a 404 or 500 browser errors which is bad for reputation. To minimize impact the alternative is obviously doing the above at 4am... Is there any alternative which allows for this to safely happen in-flight?

Frank Adler
on 9/14/14, 9:24 PM

same problem here with odoo - v8 - in a clean environement, where only an admin exists as a user and nobody is logged in at the moment. So why are there always 20 or even more processes accessing a clean database with nobody logged in? Is this a disired behavior? I hope not! Which sense makes the function to duplicate otherwise?

Peter Nietz
on 9/24/14, 7:37 AM
0
Peter Nietz
On 9/24/14, 7:49 AM

Ok this is what I get after restarting the odoo server:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

I tried it again and I get:

ProgrammingError: database "neuesOdoo" already exists

But it's not listed in odoo, only in the postgres ...

So after another restart of the server the duplicated database is also listed and can be used!

This is at all not a disireable behavior!!!

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/7/13, 10:41 AM
Seen: 5429 times
Last updated: 9/10/16, 8:19 AM