streamingfast / firehose-core

Firehose Integrators Tool Kit (for `firehose-<chain>` maintainers)
Apache License 2.0
8 stars 9 forks source link

Firehose crashes every 25min w/ SeaweedFS S3 server #15

Closed aasseman closed 11 months ago

aasseman commented 12 months ago

Using:

Chain of events:

maoueh commented 11 months ago

@aasseman Do you run with DSTORE_S3_BUFFERED_READ=true or not? If not, could you try with it and see if it makes a difference?

The Seaweed logs shows http://127.0.0.1:8080 in your setup, what is this pointing to?

aasseman commented 11 months ago

@aasseman Do you run with DSTORE_S3_BUFFERED_READ=true or not? If not, could you try with it and see if it makes a difference?

I've never heard of it before, it's not listed when I run fireeth start --help. Is there a list for those extra options somewhere? I tried it and it worked! Ran for 3 hours without a crash!

The Seaweed logs shows http://127.0.0.1:8080 in your setup, what is this pointing to?

This is the address of what they call the "filer". Since I'm running SeaweedFS in the simplest form possible (single container), it spawns all of its components in it, that's why it shows as localhost.

matthewdarwin commented 11 months ago

I did mention this when we were discussing setting up S3: https://discord.com/channels/438038660412342282/877310167060971550/1075618323594743858

aasseman commented 11 months ago

I did mention this when we were discussing setting up S3: https://discord.com/channels/438038660412342282/877310167060971550/1075618323594743858

Indeed, I didn't catch it back then... Still, it'd be nice to have it all in one place (in --help for ex) with explanations. I still don't know what DSTORE_S3_BUFFERED_READ exactly means apart from the fact that now my firehose works :shrug:

maoueh commented 11 months ago

DSTORE_S3_BUFFERED_READ reads everything in memory and then act as a io.Reader interface while the normal operation is to expose the request as a io.Reader which "streams" from the HTTP request directly.

The DSTORE_S3_BUFFERED_READ increases memory usage since the full file is held in memory. It seems we have a problem with "streaming" in the S3 implementation, the same kind of weird errors has been reported on other providers.

maoueh commented 11 months ago

Indeed, I didn't catch it back then... Still, it'd be nice to have it all in one place (in --help for ex) with explanations.

I don't the --help would be a good place for this sadly, the options applies to a lot of flags. But there should be a least a mention of the page where all options are listed.

aasseman commented 11 months ago

Thanks @maoueh ! DSTORE_S3_BUFFERED_READ=true is a good workaround for me for now. I see that you opened an issue to tackle the underlying bug, so I think I can close this one.