Closed ghost closed 9 years ago
@diiidiii please provide a sample of your write statements, especially for a point in the log_file_sync
measurement. Certainly you are hitting a bug of some sort, but without knowing more about the underlying data we can't be sure what bug it is.
Select value or Select time also doesnt work...
What error do you get for select value from log_file_sync limit 10
?
select time
is not a valid statement in InfluxQL. Times are part of the return but cannot be queried directly.
Also, what version of InfluxDB are you running?
InfluxDB Version is 0.9.3-nightly-401f1b2. I tested yesterday many hours and found out that in my python script the timestamp is "wrong". After i import the data with my script everything is working but after 10 - 15 minutes i cant access the data and when i open the dashboard on grafana the influxdb goes panic. Now i import the data with no timestamp and it works fine. The timestamp i create with the following:
timestamp = str(int(time.mktime(datetime.datetime.strptime(timestamp_ora, "%Y-%m-%d %H:%M:%S").timetuple()))) And then i send the data to influxdb over the api: os.system("curl -i -XPOST 'http://iqtsdb01:8086/write?db=oracle4&precision=s' -d 'log_file_sync,sid=" + sid + ",table=" + table_name + " value=" + value + " " + timestamp + "'")
When i execute your statement i get a empty result
select value from log_file_sync limit 10
Timestamps should be submitted as Unix epoch values, not as date-time strings. I can't tell if your code does that or not. Please provide an actual example of the submitted point, if possible. The precise syntax of the write statements will help us understand what might be happening with the data. I suspect this is a configuration issue, not an actual bug in the database.
Ok an example: from our database we get this date: 2011-11-08 04:45:02.446000 Then I convert this to the timestamp with the date-time function in python: 1320723902 I have to cast this timestamp to string because when i use it with os.system() it has to be a string... In the logs i can see the following: [http] 2015/08/06 07:48:36 4.128.2.139 - - [06/Aug/2015:07:48:36 +0200] POST /write?db=oracle&precision=s HTTP/1.1 204 0 - curl/7.29.0 c7e4aabc-3bfe-11e5-880a-000000000000 1.407525ms [httpd] 2015/08/06 07:48:36 write body received by handler: log_file_sync,sid=PP8R value=1.46747052238 1320723902
The curl request is: curl -i -XPOST 'http://iqtsdb01:8086/write?db=oracle8&precision=s' -d 'log_file_sync,sid=PP8C,table=AWR_CPU_WRAT value=5.42839148485 1369803600'
I'm facing a similar problem, running InfluxDB 0.9.2 on Ubuntu , that gets its data via collectd and a custom Python code. I have this problem accessing the data from web console.
select * from requests; Server returned error: found FROM, expected identifier, string, number, bool at line 1, char 9
While it's possible that some date-time string was written into the measurement during development, shouldn't that be a validation error / exception thrown at the write time, instead of not being able to query any data?
shouldn't that be a validation error / exception thrown at the write time, instead of not being able to query any data?
@vijayakumark, yes, this is a query parser bug, not intended behavior. There should be a fix in 0.9.3, and the data is still there and fine, it's just currently not possible to query.
@diiidiii Your timestamps and writes in general are fine, thanks for sharing the details.
I think https://github.com/influxdb/influxdb/pull/3560 is the PR that fixes these issues. Try with an 0.9.3 nightly and see if things are better.
Thanks for your help, i'll try a nigthly build.
I also had a database that seemed to have gone corrupt, tying to query anything from it would timeout and writes to other databases on the server would instantly go from around 1ms to >5s (locking it completely) until the service was restarted.. Just deleted the database and created it again.. hopefully no more problems but sad that I lost all the data... everyone, please backup regularly
Hi, my influxdb panics every time when i access data from one database via grafana (the others work fine!)... I can access everything with the influxdb shell instead of the time and value data. For example show tag values etc. works fine but the following does not work:
Select value or Select time also doesnt work... How can i find the corrupt data? Maybe you can help me...
I found out that one or two hours it works and then the influxdb always crashes when i access this data via grafana...
Here the logs: