-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Buffer overflow occours when a large compressed file is imported to influx #8986
Comments
@lets00 this is probably our fault for the implementation we used to scan import files. I think you have one or more particularly long files in your import file. If you're on In order for the importer to accept this we'll need to fix the importer, or you'll need to remove the long lines from the input (which isn't particularly practical). |
@e-dard Thank you for answer me. I ran the command, the output is described below:
The max line lenght in this file is 1678. The problem in remove the long lines is that, uncompressed, this file is extremely huge (1 GB becomes some like 200GB). And try to edit manually all long line is impractical. |
@lets00 is that the line length of the compressed file? I probably should have been more specific that it would be interesting to know the max size of a line in the uncompressed (line protocol) format. If the file is too big to handle then don't worry about that. The other thing I noticed from your initial comment is that you didn't use the |
@e-dard I used
I will try to get this information (max line lenght) with uncompressed file. |
@e-dard More information about the uncompress file. The max line length of uncompress file is 411511.
The compress file have 1678 (I did not specify before).
|
@lets00 OK, that's as I suspected then. |
@e-dard I write a solution for my problem, replacing NewScanner to NewReader function which I found in importer/v8/importer.go code. I appreciate if you could revise my code and verify if this is a good solution. |
Description
I needed export my data using influx_inspect program. I used this command to generate a output file on line protocol format.
This file has 950MB compressed, when I try to import it using influx command (
influx -import -compressed -path=monasca.dmp
) the error occours:Bug report
System info:
Ubuntu 16.04
Influx 1.3.5 and Influx 1.1.0
Database full
24GB RAM
Steps to reproduce:
Expected behavior:
The line protocol series is added on influxdb.
Actual behavior:
Nothing is added on influxdb.
Additional info:
I look at the code (https://github.com/influxdata/influxdb/blob/master/importer/v8/importer.go#L95-L112), When the file is uncompressed, the final file size is probably larger than the available RAM in the system. Chunk the decompression process on smaller parts of the file maybe solves the problem (e.g. read 1024 bytes of file, decompress it, add on the db, and so on).
The text was updated successfully, but these errors were encountered: