ome / ome/openmicroscopy

omero.LockTimeout exception on "omero admin email"

Open
#6,394 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
222
Forks
105
Avg merge
2h 21m
Merged PRs (30d)
1

Description

Hi all,

while sending emails to users using the omero admin email command is working fine in general for us, we seem to be having just too many users on our main OMERO instance.

When running e.g.

omero admin email --everyone "OMERO maintenance completed" < mailbody.txt

the process is taking "a bit" longer and at some point (25s) crashes with an omero.LockTimeout exception like this:

Using session for ehrenfeu@localhost:4064. Idle timeout: 2000 min. Current group: IMCF
Traceback (most recent call last):
  File "/opt/omero/server/venv/bin/omero", line 8, in <module>
    sys.exit(main())
  File "/opt/omero/server/venv/lib/python3.10/site-packages/omero/main.py", line 125, in main
    rv = omero.cli.argv()
  File "/opt/omero/server/venv/lib/python3.10/site-packages/omero/cli.py", line 1771, in argv
    cli.invoke(args[1:])
  File "/opt/omero/server/venv/lib/python3.10/site-packages/omero/cli.py", line 1208, in invoke
    stop = self.onecmd(line, previous_args)
  File "/opt/omero/server/venv/lib/python3.10/site-packages/omero/cli.py", line 1285, in onecmd
    self.execute(line, previous_args)
  File "/opt/omero/server/venv/lib/python3.10/site-packages/omero/cli.py", line 1367, in execute
    args.func(args)
  File "<string>", line 1629, in email
  File "/opt/omero/server/venv/lib/python3.10/site-packages/omero/clients.py", line 966, in submit
    return self.waitOnCmd(
  File "/opt/omero/server/venv/lib/python3.10/site-packages/omero/clients.py", line 989, in waitOnCmd
    callback.loop(loops, ms)  # Throw LockTimeout
  File "/opt/omero/server/venv/lib/python3.10/site-packages/omero/callbacks.py", line 258, in loop
    raise omero.LockTimeout(
omero.LockTimeout: exception ::omero::LockTimeout
{
    serverStackTrace = None
    serverExceptionClass = None
    message = Command unfinished after 25.0 seconds
    backOff = 5000
    seconds = 25
}

Unfortunately I failed in finding where to configure this timeout.

➡️ Is there a log / database entries that would tell me who received the email?

All OMERO components are on their latest version, running on Ubuntu 22.04.

Cheers,
Niko

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the omero admin email --everyone command, then trace the CLI email handler and the omero/clients.py submit and waitOnCmd calls shown in the traceback. Determine where the 25-second timeout is configured and whether sent recipients are recorded in logs or the database; done means those answers and a defined fix or documentation change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.