Community mailing list archives
RE: POS unsaved recordby
I am re-sending the below message as it was rejected by the odoo mail server.
The server log said:
INFO SELECT number_next FROM ir_sequence_date_range WHERE id=1 FOR UPDATE NOWAIT
ERROR Could not fully process the POS Order: could not obtain lock on row in relation “ir_sequence_data_range”
Our use case was to have a POS together with another phone-based online ordering channel. Customers can place orders directly from their mobile phones through this channel. During rush hours in a few days’trial run, several cases of POS orders were discovered missing, with an estimated drop ratio of 1%. It could be related to the query UPDATE NOWAIT option, but we just added two more re-tries of this query, hoping to decrease the drop ratio to 1ppm. This countermeasure seems working well till now.
hhhuumm I doubt that this happen on your postgres version...
here is an answer of Olivier Dony about concurrent access and locking on postgres
On 09/14/2015 08:34 AM, Alexandre Fayolle wrote:
> On 13/09/2015 21:57, Shawn Varghese wrote:
>> Right now, an immediate concern is the concurrency locks in the DB. Once
>> a lock occurs, Odoo only tries upto 5 times to resolve it and the delay
>> between each retry is too small.
By default the system retries up to 5 times, each after a random delay up to
2**tries seconds. So that could take up to 1 minute if all attempts are
necessary. For an interactive operation, this is actually very long - the user
will be waiting in front of her screen!
Instead of playing with these settings or installing modules as an attempt to
work around this, I would recommend 2 things:
1. Upgrade to PostgreSQL 9.3 or 9.4 if that is not done yet. PG 9.3 introduces
new row locking levels (FOR KEY SHARE) that will drastically reduce the
conflicts caused by foreign key constraints. Doing this alone could be
sufficient to solve your problems.
2. Review your transactions and try to understand why you are seeing
conflicts.. something fishy is probably going on.
2a. Before PG 9.3, you should only get TransactionRollbackErrors caused by
logins if other transactions are creating or updating data with the same user
as the one logging in. This is supposed to be rare even with hundreds of users
unless you are sharing logins between users, cron jobs and/or web services. And
even in this case, a TransactionRollbackError should only occur if the login
occurs between the moment a transaction starts and the time it creates/updates
the first record.
2b. As of PG 9.3, you should not see TransactionRollbackErrors caused by logins
unless your transactions are actively updating user records themselves. This
should not happen much with the standard Odoo distribution.
>> Also, to increase the number of HTTP workers, it is just a simple case
>> of giving a non-zero number to the *workers* parameter in the config file?
Yes, but you want to carefully consider the number of workers you're
configuring, and the memory limits you configure. When you activate workers
mode you make a better use of your CPU cores, but you risk introducing
delays/bottlenecks if you don't tune it correctly. Too many workers is better
than too few, as long as the memory limits ensure you can't fill up the whole
memory and start swapping.
>> How exactly does one achieve load balancing?
Odoo's built-in workers mode performs load-balancing over multiple processes on
a single machine. If you want to do the balancing over multiple machines just
replicate this setup on several machines and put a reverse proxy in front of
them (read up on Apache's mod_proxy  or nginx's upstream modules  for
2016-07-26 1:47 GMT+02:00 崔建平 <firstname.lastname@example.org>:
It is running on PG 9.5. Concurrent access to the table requesting a serial number temporarily locks the table by one inquiry, making the others abort.
From: Houssine BAKKALI [mailto:email@example.com]
Sent: Monday, July 25, 2016 8:43 PM
To: Community <firstname.lastname@example.org>
Subject: Re: POS unsaved record
On which version of postgresl are you running? table locking improvement have been done as from 9.2 or 9.3 AFAIR
2016-07-25 1:17 GMT+02:00 崔建平 <email@example.com>:
We discovered from our cases that the cause is due to table row lock mechanism from postgresql, being unable to get a serial number assigned. The original codes simply give up and log an warning.
We added a couple of re-tries to the original codes. The system has been running for nearly two months now, and there seems no more missing orders.
Dear Walid Baruni,
Check your Odoo server log..you may get some trace from there..like some access issue log or error messages in the Odoo server log will help to identify the issue
On Sunday, 24 July 2016, Walid Baruni <firstname.lastname@example.org> wrote:
The users are only using a single browser. Used to be Firefox and now switched all of them to Chrome.
I am using in-house customized modules, but I doubt they are the reason behind this issue.
Dear Walid Baruni,
Can u check is the Pos users using only one browser or multiple browsers/systems for doing the sales?
Also are you using the default Pos code only or using some customizied POS modules ?
My problem is different as the missing orders don't exist at all in the database and there are gaps in the pos references where they should exist!
On Jul 23, 2016, at 10:58 PM, Lithin Thampan <email@example.com> wrote:
This may happening due to some way of duplicating the pos reference number. Odoo checks the order to sync or not using the POS reference number(Receipt ref number:- pos_reference),
can you check do you have any orders in your system which is having the same receipt reference number(receipt which customer bring for return) ?
The same problem here with regular POS sales. We discovered the issue when customers bring their receipts to return some items, but the order is not found in the database.
We are 100% sure that the orders are not stuck in the browser local storage and that there is no red signal with pending orders in the POS clients
We encountered the same problem sometimes. Until now we couldn't fine the reason why POS not save some records. In our case the client didn't save the first tickets of the day.
Lately we discovered a problem of missing records in the databased from POS session. I would like to know if anyone has encountered such issue and what the cause could be.
One client runs on SaaS-7 (based on 9.0c) for a newly opened restaurant. The system works well until lately it is discovered a few orders were not registered in the system. In those cases customers paid their bills and POS printed their receipts with system generated order numbers. Customers waited at tables but no meals were served. Only when they complained was it discovered their orders were not even recorded to the database. Printers at kitchen did not print out these orders, as no records were retrieved from the db (through a custom module). That is, order numbers assigned on the receipts do exist in the db. Their sequence number is skipped.
Appreciate for your inputs.
Qingdao Odoo Software Solutions.