-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Rewritten PUT of attachment hangs #1878
Comments
The JavaScript engine has not, and will not, have access to document attachments. Sorry. |
@nkronlage I‘ll look into it. @wohali, your verdict seems bit premature. |
@ermouth let me know if you find a problem, i assumed it was related to attachments. |
JS rewrite definitely sees attachments sent in that way, which may be checked using ddoc returning request JSON:
However, it’s unclear what happens when rewrite fn conveys result to Couch. Explicitly defining Gonna dig into it, smth interesting. |
@wohali I see this in logs:
Can you please give a hint what may cause |
It means the amount of time necessary to process the document update was exceeded. As you can see from the logfile it took 60s. Is it taking JS longer than 60s to process the document, perhaps? That seems likely... |
According to logs JS processing took <1ms (38.326369—38.327145), which is very consistent with my experience about JS rewrites: they are fast. 60s timeout is a request timeout, not a special attachments timeout (which is 10min). So I’m pretty sure JS is not the case here, this is smth more interesting. |
no clue, and don't have time to look any deeper, sorry |
is this issue resolved in any other next version 2.1.x ? |
@glrao afaik not |
Expected Behavior
Using a simple rewrite javascript function that maps to the non-rewrite path should allow uploading attachments.
Current Behavior
Using PUT to upload attachments hangs and eventually returns {"error":"unknown_error","reason":"undefined"}.
This appears to be very similar to issue #1612. @ermouth, in case you know about this.
Steps to Reproduce
This creates a database
r
and a design docn
that has a rewrite function that should pass the requests to ther
database unmodified. Using the rewrite function to GET or PUT documents works fine. Using it to PUT an attachment causes the connection to hang for a while and then return an 'unknown_error'.The text was updated successfully, but these errors were encountered: