Skip to content
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

api.py or Meteor Server 2 minutes timeout while cloning board #5371

Closed
e-gaulue opened this issue Apr 10, 2024 · 3 comments · Fixed by #5412
Closed

api.py or Meteor Server 2 minutes timeout while cloning board #5371

e-gaulue opened this issue Apr 10, 2024 · 3 comments · Fixed by #5412

Comments

@e-gaulue
Copy link
Contributor

Issue

Server Setup Information

  • Did you test in newest Wekan?: Snap latest/candidate
  • Did you configure root-url correctly so Wekan cards open correctly (see https://github.com/wekan/wekan/wiki/Settings)? Yes
  • Operating System: Debian Bookworm
  • Deployment Method (Snap/Docker/Sandstorm/bundle/source): Snap
  • Http frontend if any (Caddy, Nginx, Apache, see config examples from Wekan GitHub wiki first): Not applicable here, api.py direct connexion to http://localhost:3001
  • Node.js Version: v18.19.0
  • MongoDB Version: snap version
  • What webbrowser version are you using (Wekan should work on all modern browsers that support Javascript)? api.py

Problem description

someone@wekan:~/Scripts$ date;./api.py copyboard kZF23soqDqqKWTmxf PH-2024-14;date
mer. 10 avril 2024 14:49:16 CEST
http://localhost:3001/api/boards/kZF23soqDqqKWTmxf/copy
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 704, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 450, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
    httplib_response = conn.getresponse()
                       ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 788, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 704, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 450, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
    httplib_response = conn.getresponse()
                       ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gaulue/Scripts/./api.py", line 497, in <module>
    body = requests.post(edboardcopy, json=post_data, headers=headers, timeout=None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 547, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
mer. 10 avril 2024 14:51:17 CEST

Times shows that it stop exactly after 120s. python request http used in api.py is known to wait forever, so I would blame meteor.

This board is not so big, but get cards that send email each time they are cloned (maybe one of the reason).

Maybe there is already an option to rise this limit.

Logs

Nothing in the log around those times.

@xet7
Copy link
Member

xet7 commented Apr 11, 2024

If there is requirement to clone board immediately, that requires:

a) Different database, that has feature of immediate branching like git branch
b) Different database structure backend logic, where copying board only creates new board ID that has link to original board ID. But does not duplicate data.

@e-gaulue
Copy link
Contributor Author

I looked at it more this morning.

I thought the emails I received where linked with cards I did subscribe in my main board, but in fact it's just emails with card creation webhook messages. Maybe it's this webhook ongoing process that doesn't manage to finish fast enough. By the way, {{{wekan-username}}} is always "undefined" in the massage describe on

"user": "{{wekan-username}}",
.

Could those webhooks be disable while cloning or using API? Does it give any ideas of what is going on?

There is no need for immediate board cloning. Looking at it, I've got the feeling everything is well clone on my board (but my thumb card information). api.py just finish this way that gives the feeling something went wrong.

@e-gaulue
Copy link
Contributor Author

e-gaulue commented Apr 29, 2024

Sorry to come back on it, but I tried to read the documentation regarding webhook and I don't find anywhere to go to modify configuration or wekan to avoid this behaviour.

I've been to global configuration: no webhook
I've been to the cloned board configuration: no webhook
I've been to the original board configuration: no webhook

But all administrators receive emails (one by list of the original board), with the messages described in wekan/docs/wekan.wiki/Webhook-data.md, one message for each card created during the duplication. It doesn't happen when cloning through the GUI, only through API.

I try to find what trigger this.

e-gaulue added a commit to e-gaulue/wekan that referenced this issue May 15, 2024
1. It takes too long while server stops after 2 minutes (wekan#5371).
2. It is useless, because when you copy a board, most of the time your users don't want to be notified of every copied cards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants