Hi Jonathan,
you're right! curl uses the header "Accept: */*" and OrientDB can't manage
the response in the right way. I've just fixed this on "develop" branch. Or
you can add this when you use curl:

--header "Accept: application/json"

Example:

curl -u admin:admin --header "Accept: application/json" --data
"insert%20into%20stuff(name)%20VALUES%20(%27testing%27)"
http://localhost:2480/command/GratefulDeadConcerts/sql/


Lvc@



On 4 January 2014 18:54, Jonathan Rosen <[email protected]> wrote:

> I installed from Github source using ant:
>
> > git clone [email protected]:orientechnologies/orientdb.git
> > cd orientdb
> > ant clean install
>
> Then I started up database server (/bin/server.sh). I created a new database 
> in the console (to mitigate risk that problem was from import of old db).
>
> Then if you open any curl client, and issue the command I pasted below, the 
> database takes a very long time and eventually it will succeed.
>
> The same query executes in normal time from the console. It appears to be 
> REST that is affected.
>
>
>
> On Saturday, January 4, 2014 1:30:01 AM UTC-5, Lvc@ wrote:
>
>> Hi,
>> that is a simple insert, so the execution time is supposed to be under
>> half second even with the slowest computer. How can I reproduce it?
>>
>> Lvc@
>>
>>
>>
>> On 3 January 2014 22:26, Jonathan Rosen <[email protected]> wrote:
>>
>>>  When I issue a command to the rest api in the latest version of
>>> orientdb, it takes an inordinately long time for anything to happen.
>>>
>>> For example, if I issue this post request:
>>> url: http://admin:admin@localhost:2480/command/mydb/sql/
>>> body: insert%20into%20stuff(name)%20VALUES%20(%27testing%27)
>>>
>>> That query takes 30.027 seconds to execute. Likewise similar insertion
>>> operations to the database. My curl requests from php are timing out due to
>>> how long these types of requests are taking.
>>>
>>> What is going on here? I observed this first on my Ubuntu production
>>> server, and then installed 1.6.3 locally on my Mac to verify. Both lead to
>>> the same result...
>>>
>>> I installed via ant from Github in both cases. Am I missing something
>>> here in terms of server configuration?
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to