-
Notifications
You must be signed in to change notification settings - Fork 98
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
Relay eventually times out all events when using a writePolicy plugin #112
Comments
The most likely explanation I can think of is that the plugin isn't responding to a particular event, or its response is malformed somehow. Are there any possible failure conditions in your plugin that would prevent a response from being delivered? Around when it locks up do you see any logs like noteguard looks pretty sweet BTW! |
On Thu, Jul 18, 2024 at 08:25:52PM GMT, Doug Hoyte wrote:
The most likely explanation I can think of is that the plugin isn't
responding to a particular event, or its response is malformed somehow.
Are there any possible failure conditions in your plugin that would
prevent a response from being delivered?
Only if the input doesn't parse, then it has no id to put into the
output message for serialization.
I tried to simplify the loop so we'll see if that helps. Feel free to
check the code. I can't see anything wrong with it:
https://github.com/damus-io/noteguard/blob/8e1bb0363f1c7729195a560ba1cd91f5b1c657c8/src/main.rs#L140-L170
As you can see noteguard.run() is guaranteed to return and write an output
message for each valid input, and all of the filters are pretty simple
and would never timeout.
|
I'm not sure TBH. I setup noteguard and it's passing all my basic testing. The buffering is correct and I can't see any obvious error cases that would de-sync the stream. So, I made a debugging script: https://github.com/hoytech/strfry/blob/master/scripts/plugin-debug.pl Can you please try this? You need the
It detects some obvious problems, like mismatched ID, undecodeable JSON, etc. It also times out if it doesn't get a response, by default after 5 seconds. This will restart the plugin, so hopefully you won't need to pkill every hour anymore! After it's running a while, check the strfry logs for lines starting with Thank you! |
at first I thought this was some resource exhaustion in an efficient script I was using, so I rewrote my plugins in rust, but still after awhile the relay eventually just times out all incoming notes. I am looking through the plugin code and don't see anything obvious where it could go wrong 🤔
for now I have to pkill strfry every hour to fix it, but its definitely not ideal
The text was updated successfully, but these errors were encountered: