11-12-2020 03:15 AM
Hello,
I faced a strange error with maapi, ncs-python-vm-service1.log:
File line 18, in apply
File line 16, in mymethod
with maap.start_read_trans(usid=uinfo.usid) as trans:
File line 560, in start_read_trans product, version, client_id)
File line 548, in start_trans vendor, product, version, client_id) _ncs.error.Error: internal error (18):
devel.log is:
ncs[1452]: ncs commit progress db=running usid=4309 thandle=23747: ncs: device device1: get-trans-id: device get-trans-id error
There is maapi transaction1 before the error:
maap = ncs.maapi.Maapi()
with maap.start_read_trans(usid=uinfo.usid) as trans:
then maapi transaction2 before the error:
maap = ncs.maapi.Maapi()
with maap.start_read_trans(usid=uinfo.usid) as trans:
then maapi transaction3 at the error:
maap = ncs.maapi.Maapi()
with maap.start_read_trans(usid=uinfo.usid) as trans:
NSO version 4.7.5
Solved! Go to Solution.
11-12-2020 06:40 AM - edited 11-12-2020 06:41 AM
I figured out the reason of the error, it was due to very long action (more than two minutes), which lead to application timeout error, so I used the below command in main.py under class Action to increase action timeout to five minutes:
_ncs.dp.action_set_timeout(myuser, 300)
11-12-2020 04:15 AM
Hi!
Im sorry but without more information it's impossible to say anything regarding this. Please give us a bit of context. Looks like your service called service1 fails, but a bit more code than just "with maap.start_read_trans(usid=uinfo.usid) as trans:" would be nice?
11-12-2020 04:30 AM
its very large code, so which part exactly do you need ?
11-12-2020 06:40 AM - edited 11-12-2020 06:41 AM
I figured out the reason of the error, it was due to very long action (more than two minutes), which lead to application timeout error, so I used the below command in main.py under class Action to increase action timeout to five minutes:
_ncs.dp.action_set_timeout(myuser, 300)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide