From dev-return-27890-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Thu Jun 6 17:59:21 2013
Return-Path:
X-Original-To: apmail-couchdb-dev-archive@www.apache.org
Delivered-To: apmail-couchdb-dev-archive@www.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id C404F106D8
for ; Thu, 6 Jun 2013 17:59:21 +0000 (UTC)
Received: (qmail 72019 invoked by uid 500); 6 Jun 2013 17:59:20 -0000
Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org
Received: (qmail 71971 invoked by uid 500); 6 Jun 2013 17:59:20 -0000
Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: dev@couchdb.apache.org
Delivered-To: mailing list dev@couchdb.apache.org
Received: (qmail 71928 invoked by uid 99); 6 Jun 2013 17:59:20 -0000
Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 17:59:20 +0000
Date: Thu, 6 Jun 2013 17:59:20 +0000 (UTC)
From: "Eli Stevens (JIRA)"
To: dev@couchdb.apache.org
Message-ID:
In-Reply-To:
References:
Subject: [jira] [Commented] (COUCHDB-1817) Exceeding the couchjs stack size
does not have a clear error message
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394
[ https://issues.apache.org/jira/browse/COUCHDB-1817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13677314#comment-13677314 ]
Eli Stevens commented on COUCHDB-1817:
--------------------------------------
45MB documents were running couchjs out of stack space. Removing the large documents caused the DB to be able to serve views again. See updated description.
> Exceeding the couchjs stack size does not have a clear error message
> --------------------------------------------------------------------
>
> Key: COUCHDB-1817
> URL: https://issues.apache.org/jira/browse/COUCHDB-1817
> Project: CouchDB
> Issue Type: Bug
> Components: JavaScript View Server
> Reporter: Eli Stevens
> Priority: Minor
> Attachments: couchdb__couchdb_files.png, couchdb__httpd_status_codes.png, couchdb_mem.png, loadavg.png, memory2.png
>
>
> Updated description:
> When a large document is uploaded and the couchjs process runs out of stack, the error message that gets produced does not make it easy to debug what is going wrong.
> In our case we had some data that should have been an attachment but was ending up in the document proper, which caused us to have 45MB documents, which triggered the issue. Having an error message that says which document ran the view server out of space, etc. would be nice.
> ---
> Original description:
> We have started seeing errors crop up in our application that we have not seen before, and we're at a loss for how to start debugging it.
> [~dch] Said that we might look into system resource limits, so we started collecting all of the output from _stats into RRD (along with memory, load, etc. that we were already collecting), but nothing is jumping out at us as obviously problematic.
> We can semi-reliably reproduce the problem, but it's far from a minimal test case (basically, we load up several large chunks of data, and then halfway through the processing run, we get the error). The error doesn't seem to happen if we load up each chunk by itself.
> The DB in question has about 100 docs in it, none particularly large (nothing over a couple KB would be my guess), with a couple hundred MB in attachments. 10ish design docs, coffeescript. In general, there isn't anything that seems obviously resource intensive.
> We have seen this issue on 1.2.0, 1.2.1, and we're working on getting a machine with 1.3.0 set up (the PPA we'd been using hasn't been updated yet). Ubuntu 12.04, spinning disk, etc. The system is under load when it happens, but the load isn't more than 1.5x the number of cores. I don't have disk IO numbers at hand, but I'd be surprised if that was being strained.
> Error as it appears in couch.log: https://gist.github.com/wickedgrey/e7fd3fc14b6d43e95564
> The design doc in question: https://gist.github.com/wickedgrey/db41b0c3c75a590e2109
> An example document: https://gist.github.com/wickedgrey/a8422aab261ddd2ce4fe
> We have some preliminary evidence that the problem persists after the system goes quiet, but we're not certain.
> Either CouchDB isn't handling things correctly, in which case this bug is "prz fix" or we're doing something wrong (hitting a resource limit, or something), in which case this bug is "prz make the error message more informative".
> Thanks!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira