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

Error: open /dev/null: too many open files #62

Open
dnyg opened this issue Sep 3, 2024 · 4 comments
Open

Error: open /dev/null: too many open files #62

dnyg opened this issue Sep 3, 2024 · 4 comments

Comments

@dnyg
Copy link

dnyg commented Sep 3, 2024

When running a Claude LLM in Dify with the Response Format set to JSON, I receive from the langgenius/dify-sandbox:0.2.6 this error:

open /dev/null: too many open files

@Yeuoly
Copy link
Collaborator

Yeuoly commented Sep 6, 2024

Hi, could you pls provide a bit more details about this? such as your DSL, logs etc.

@dnyg
Copy link
Author

dnyg commented Sep 18, 2024

I can't really provide anything useful from the sandbox service itself, as it isn't really outputting anything. But this is how it looks from Dify:

Screenshot 2024-09-18 at 15 12 12

@Yeuoly
Copy link
Collaborator

Yeuoly commented Sep 19, 2024

It looks weird, I'm not sure why it costs so many times, could you pls give me your code as a testcase? you can desenstitive it of course.

@YidaHu
Copy link

YidaHu commented Jan 13, 2025

@Yeuoly I have the same problem. Very simple code.

image

Code:

import json
import traceback

def main(body: str) -> dict:
    try:
        data = json.loads(body)['body']
        return {'result': json.dumps(data, ensure_ascii=False), 'err': ''}
    except (json.JSONDecodeError, TypeError):
        err = traceback.format_exc()
        return {'result': '', 'err': str(err)}

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

3 participants