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

Getting OOM error while running python node #7

Open
keajer opened this issue Mar 11, 2023 · 3 comments
Open

Getting OOM error while running python node #7

keajer opened this issue Mar 11, 2023 · 3 comments

Comments

@keajer
Copy link

keajer commented Mar 11, 2023

getting the following error: n8n may have run out of memory while executing it while executing an HTML parsing job.

n8n was assigned 20g ram, so there is no way the execution on this node would run oom.
I wonder if there is a memory limit on the node itself. How can I config this limit?

@naskio
Copy link
Owner

naskio commented Mar 11, 2023

Hello @keajer
The error you are experiencing does not seem to be related to this library. For further information, please check out this section "Memory-related errors"

@keajer
Copy link
Author

keajer commented Mar 13, 2023

It unlikely its related to the overall ram from n8n. it's likely the node crashed with a wrong error message.
btw, I also got an error with Cannot read properties of undefined (reading 'main') in the main n8n stdout when the python node crashes.

@keajer
Copy link
Author

keajer commented Mar 13, 2023

Paste the code below for visibility

from bs4 import BeautifulSoup

for item in items:
  if 'body' in item:
    body = item['body']
  if 'headers' in item:
    headers = item['headers']

soup = BeautifulSoup(body)
tb = soup.find('tbody')
del soup
res = [i.find('span', {'class': 'titleline'}).text for i in tb.find_all('tr', {"class": "athing"})]
del tb
return [{'date': headers['date']}, {'res': res}]

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

No branches or pull requests

2 participants