Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1EA5C159 for ; Tue, 12 Jun 2012 08:43:17 +0000 (UTC) Received: (qmail 96751 invoked by uid 500); 12 Jun 2012 08:43:16 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 96715 invoked by uid 500); 12 Jun 2012 08:43:16 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 96706 invoked by uid 99); 12 Jun 2012 08:43:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 08:43:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rizalp@gmail.com designates 209.85.160.180 as permitted sender) Received: from [209.85.160.180] (HELO mail-gh0-f180.google.com) (209.85.160.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 08:43:09 +0000 Received: by ghbz12 with SMTP id z12so3486454ghb.11 for ; Tue, 12 Jun 2012 01:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+ukfvG4klkP4aELf3mjzb9B9CZzeCQFE+I9KZ3a1bFg=; b=NkcXq0PmJtsyK20J/hVnM5BnYp0adwn/03X2cnqj9mi04TWMO9xQSkcDLlgBSiIzO5 HqXgcVMq0NUvxRG7fvpIhmkhbHexbIGdtfI+k1O0gSOZvo78RQl4zyBsSKjdf9QW3IxS BD9TcA8g3xuN4SXyCNHfZnBao8mOf/jQ6G77erVfjzxAY4jj3uq1nGC0rc8psIpr314I a7DlwUyxOo4A+A6iyFn7wjwgJd75K/49C5kAVIlr2WT2YIJ+EsyLjFjJSiRUXmmR/9Gz WPZkl+tOE/uLlovNTw5e+9V+zT9kMSYahuVzpV5AO9ixjzntOSVXntrp80Akn6T23TTX WQlQ== MIME-Version: 1.0 Received: by 10.60.9.193 with SMTP id c1mr19278566oeb.47.1339490568186; Tue, 12 Jun 2012 01:42:48 -0700 (PDT) Received: by 10.76.2.142 with HTTP; Tue, 12 Jun 2012 01:42:48 -0700 (PDT) In-Reply-To: References: <93C87D8E-D891-4C54-B7AC-A621A68A11C9@apache.org> Date: Tue, 12 Jun 2012 15:42:48 +0700 Message-ID: Subject: Re: How to do Bulk-insert from Huge JSON File (460 MB) From: Mohammad Prabowo To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=e89a8ff1c9167f2aac04c2427399 --e89a8ff1c9167f2aac04c2427399 Content-Type: text/plain; charset=ISO-8859-1 I can only see indication in Couch.log as if nothing happened. I've tried using smaller JSON file (4K) and it run successfully. I'm using couchDB 1.2 On Tue, Jun 12, 2012 at 11:38 AM, Dave Cottlehuber wrote: > On 12 June 2012 06:27, Mohammad Prabowo wrote: > > Still no result. I guess i have to split it into smaller documents.. > > > > On Mon, Jun 11, 2012 at 7:03 PM, Robert Newson > wrote: > > > >> > >> -d will load the whole file into memory and also interpret it as ascii, > >> which might make it invalid. > >> > >> use -T instead. > >> > >> B. > >> > >> On 11 Jun 2012, at 12:29, Mohammad Prabowo wrote: > >> > >> > Hi. I need to do bulk-insert of document in my CouchDB database. > >> > I'm trying to follow the manual here: > >> > http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API > >> > > >> > Here is my code: > >> > > >> > ~$ DB="http://localhost:5984/employees" > >> > ~$ curl -H "Content-Type:application/json" -d > >> @employees_selfContained.json > >> > -vX POST $DB/_bulk_docs > >> > > >> > the file employees_selfContained.json is a huge file = 465 MB. I've > >> > validated it using JSONLint and found nothing wrong > >> > Here's the curl's verbose output: > >> > > >> > curl -H "Content-Type:application/json" -d > @employees_selfContained.json > >> > -vX POST $DB/_bulk_docs > >> > * About to connect() to 127.0.0.1 port 5984 (#0) > >> > * Trying 127.0.0.1... connected > >> > * Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0) > >> >> POST /employees/_bulk_docs HTTP/1.1 > >> >> User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 > >> OpenSSL/0.9.8k > >> > zlib/1.2.3.3 libidn/1.15 > >> >> Host: 127.0.0.1:5984 > >> >> Accept: */* > >> >> Content-Type:application/json > >> >> Content-Length: 439203931 > >> >> Expect: 100-continue > >> >> > >> > < HTTP/1.1 100 Continue > >> > * Empty reply from server > >> > * Connection #0 to host 127.0.0.1 left intact > >> > curl: (52) Empty reply from server > >> > * Closing connection #0 > >> > > >> > How can i do bulk-insert from that Huge single file? I prefer not to > >> split > >> > the file into smaller size if possible.. > >> > >> > > > Mohammed, > > What do you see in the couch.log ? > > I'd be interested to hear if this same upload works against 1.1.1 vs 1.2.0. > > Thanks > Dave > --e89a8ff1c9167f2aac04c2427399--