Oddbean new post about | logout
 I'm questioning if multiple filters in a REQ was ever a good idea. I treat a single REQ as one database query. I could break them up and treat them like separate requests (but so could you). I'm not sure whose responsibility that is. If I do, I will need to rate-limit the number per interval of filters instead of the number of websocket messages. 
 Let me try to get to the same filter. Amethyst is supposed to group those into bigger filters. But I am wondering if there is a bug when since is not present in these filters. 

What's the relay url to test this out?  
 wss://gleasonator.dev/relay 
 Yep, this one. Thank you Mr. Patrick! 🍀  
 Ok I am getting `error: something went wrong` on that filter. Is that the timeout error?  
 There is something weird going on. Your relay doesn't like the kind 1984 with only the ptag filter. 

This simple one takes forever. 
```
[
   {
      "kinds":[
         1984
      ],
      "#p":[
         "99bb5591c9116600f845107d31f9b59e2f7c7e09a1ff802e84f1d43da557ca64",
         "8867bed93e89c93d0d8ac98b2443c5554799edb9190346946b12e03f13664450"
      ]
   }
]``` 
 Actually, just one p-tag runs into the same error: 


``` 
[ "REQ", "aa2dd",
   {
      "#p":[
         "8867bed93e89c93d0d8ac98b2443c5554799edb9190346946b12e03f13664450"
      ]
   }
]```

```
[
  "CLOSED",
  "aa2dd",
  "error: something went wrong"
]
```
 
 I bet there is a record between this since and until that you cannot reassemble to send back: 

[ "REQ", "aa2dd",
   {
      "since": 1719870040,
      "until": 1719870100,
      "#p":[
         "8867bed93e89c93d0d8ac98b2443c5554799edb9190346946b12e03f13664450"
      ]
   }
] 
 I increased the timeout a lot and it still gets cancelled, yikes. I can't get into postgres to "explain analyze" from this hotel wifi. Will try to see later. Thanks for your help. 
 Hi Vitor, is this just a sample request or there is indeed at least 1 event that matches this tags and kinds? I have a relay called "wss://slime.church/relay" and it's the same code as "wss://gleasonator.dev/relay" (both run ditto).

However, I couldn't reproduce this issue with slime.church, the request is fast and the response is empty. 
 I don't know if there is an event. But the filter bug is real. It doesn't work even if I ask through Websocket testing sites. 
 Got it, I just don't understand why this doesn't happen with wss://slime.church/relay, perhaps there's a specific configuration in wss://gleasonator.dev/relay that is messing things up, I'll take a look, thanks 
 It's the amount of data that's the problem. Because with ORDER BY, it has to go through everything to figure out which is the most recent before it can pull even 1 result.