Community mailing list archives

community@mail.odoo.com

RE: POS unsaved record

by
Qingdao Oudu Software Co.,Ltd, Cui Jianping / Jason
- 07/26/2016 22:38:55

Attached is a snapshot of error log when the issue was reported.

 

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 running till now.

 

From: Houssine BAKKALI [mailto:houssine.bakkali@gmail.com]
Sent: Tuesday, July 26, 2016 4:58 PM
To: Community <community@mail.odoo.com>
Subject: Re: POS unsaved record

 

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 [1] or nginx's upstream modules [2] for 

example).

 

 

[1] http://httpd.apache.org/docs/2.4/mod/mod_proxy_balancer.html

[2] http://nginx.org/en/docs/http/load_balancing.html

 

 

2016-07-26 1:47 GMT+02:00 崔建平 <jason@qdodoo.com>:

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:houssine.bakkali@gmail.com]
Sent: Monday, July 25, 2016 8:43 PM


To: Community <community@mail.odoo.com>
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 崔建平 <jason@qdodoo.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.

 

Jason

 

 

From: Lithin Thampan [mailto:lithint.mail@gmail.com]
Sent: Monday, July 25, 2016 3:13 AM
To: Community <community@mail.odoo.com>
Subject: Re: POS unsaved record

 

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 <baruni@osoul.ly> wrote:

Dear Lithin,

 

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.

 

 

On Jul 24, 2016, at 11:27 AM, Lithin Thampan <lithint.mail@gmail.com> wrote:

 

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 ?

 

On Sunday, 24 July 2016, Walid Baruni <baruni@osoul.ly> wrote:

Thanks Lithin,

 

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 <lithint.mail@gmail.com> wrote:

Hi,

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) ?

please refer the following links

https://github.com/odoo/odoo/issues/1849

https://github.com/odoo/odoo/issues/7388

 

 

On Sun, Jul 24, 2016 at 4:17 AM, Walid Baruni <baruni@osoul.ly> wrote:

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

 

--

Walid

 

On May 24, 2016, at 1:27 AM, angel.camacho@minorisa.net wrote:

 

Hi Jason

 

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.

 

 


De: "崔建平" <jason@qdodoo.com>
Per: "Community" <community@mail.odoo.com>
Enviats: Dilluns, 23 de Maig 2016 8:25:43
Assumpte: POS unsaved record

 

Hi community,

 

 

 

 

 

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.

 

 

 

 

 

Thanks.

 

 

 

 

 

Jason

 

 

Qingdao Odoo Software Solutions.

 

 

 

 

 

 

 

 

_______________________________________________
Mailing-List:
https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe:
https://www.odoo.com/groups?unsubscribe

 

 

--

Àngel Camacho Perez

Consultor / Analista Odoo

Cap de Projectes

 

图像已被发件人删除。 图像已被发件人删除。 图像已被发件人删除。

 

MINORISA DE SISTEMAS | Pica d'Estats 77-95, 08272 Sant Fruitós de Bages | T: 938 748 686 | F: 938 740 859 |

 

Podeu consultar la nostra política de privacitat

 

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

 

 

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--

Thanks & Regards,

Lithin T
Software Engineer

Mob  :
+971556712557(UAE)
Mail  :
lithint.mail@gmail.com | Skype : lithint.skype

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe



--

Thanks & Regards,

Lithin T
Software Engineer

Mob  :
+971556712557(UAE)
Mail  :
lithint.mail@gmail.com | Skype : lithint.skype

 

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe



--

Thanks & Regards,

Lithin T
Software Engineer

Mob  :
+971556712557(UAE)
Mail  :
lithint.mail@gmail.com | Skype : lithint.skype

 

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe