-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Killed odoorpc process on restore large dump #37
Comments
I think this is not something that can be handled at OdooRPC level, as it's how Odoo works. You should have more memory for that operation. @sebalix am I right? |
But the recovery of the same 4.5 Gb dump via Odoo UI is successful. The problem occurs only through OdooRPC. |
The culprit might be RPC, not OdooRPC 😉 but let's wait for the confirmation. |
We need to investigate, there are two ways (two different RPC calls) to restore a dump if I remember well, but one requires a CSRF token and not the other, maybe the first is used by Odoo UI and is able to handle big dump (sent as a binary content through a HTTP request), and the other (used by OdooRPC, sending the dump as base64 in a JSON parameter) is crashing. As a general rule, Odoo UI uses EDIT: maybe not about the CSRF token: https://github.com/odoo/odoo/blob/12.0/addons/web/controllers/main.py#L766 so it could be possible to dump/restore big databases with these HTTP controllers. |
@Man-1980 can you try this piece of code with your big file please? import base64
with open(dump_file_name) as dump_zip:
b64_data = base64.standard_b64encode(dump_zip.read()).decode() Are you getting the same result? |
|
@Man-1980 Thank you, so this is the b64 encoding of such large files which consumes too much memory. Two possibilities:
The 2) is the best option, quicker to implement. I let this issue opened, this needs some work, thanks for the report. |
I think this is related to #4. |
What do we finally do with this? |
@pedrobaeza didn't have time to work on this unfortunately. You can let it open |
@sebalix any news on this? |
@GSLabIt still not sadly, no time to work on that ATM :( |
For those that still have issues, I have replace the following code I used to make backups:
with this:
The rest of my script still uses RPC to collect all data I need (lists of databases mostly) |
@Thulium-Drake did you find a way to also restore the DB in chunks? The backup does work fine |
Hi,
I restoring dump by the following command:
with open(dump_file_name) as dump_zip: odoo.db.restore(odoo_pass, db_name, dump_zip)
With small dumps the restore function runs good.
But if I try to restore a bigger dump (zip file 4.6 GB) Free memory ends and I get the message:
Killed
The text was updated successfully, but these errors were encountered: