# Help! Problem output using jdbc input

**URL:** <https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221>\
**Category:** Logstash\
**Created:** [July 7, 2017, 7:46am UTC](https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221 "2017-07-07T07:46:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nano](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@nano](https://discuss.elastic.co/u/nano)\
**Post date:** [July 7, 2017, 7:46am UTC](https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221/1 "2017-07-07T07:46:31Z")

</div>

Hello! i'm using jdbc input to access my first Mysql data, my schedule is around 30 minutes, after that i'm using jdbc streaming to upload an other database , then i use simple output to see my data as stdout ruby , the problem is that the process is very slow and after running it in mode debug i see my first statement and after 20 minutes the same statement again and i have nothing in my output

---

<div class="post-metadata">

**Author:** ![nano](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@nano](https://discuss.elastic.co/u/nano)\
**Post date:** [July 7, 2017, 8:51am UTC](https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221/2 "2017-07-07T08:51:05Z")

</div>

I have removed the schedule, even though after 10 minutes the statement of my first database is repeating , please help

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 7, 2017, 9:39am UTC](https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221/3 "2017-07-07T09:39:51Z")

</div>

Start by posting your Logstash configuration.

---

<div class="post-metadata">

**Author:** ![nano](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@nano](https://discuss.elastic.co/u/nano)\
**Post date:** [July 7, 2017, 9:47am UTC](https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221/4 "2017-07-07T09:47:47Z")

</div>

input {  
jdbc {  
jdbc\_driver\_library =\> "/etc/logstash/mysql-connector-java-5.1.36.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mysql:\***_"  
jdbc\_validate\_connection =\> true  
jdbc\_user =\> "_**"  
jdbc\_password =\> "\*\*\*\*\*_"  
jdbc\_paging\_enabled =\> "true"  
jdbc\_page\_size =\> "50000"  
 #schedule =\> "_/40 \* \* \* \*"  
statement =\> "SELECT id1, id2, Id3, id4 from base1 where id3 \> :sql\_last\_value AND id2 REGEXP '' order by id1 ASC Limit 1000"  
record\_last\_run =\> "true"  
use\_column\_value =\> "true"  
tracking\_column =\> "id2"  
tracking\_column\_type =\> "numeric"  
clean\_run =\> "false"  
last\_run\_metadata\_path =\> "/etc/logstash/.logstash\_jdbc\_last\_run"  
type =\> "base"  
}  
}

---

<div class="post-metadata">

**Author:** ![nano](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@nano](https://discuss.elastic.co/u/nano)\
**Post date:** [July 7, 2017, 9:48am UTC](https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221/5 "2017-07-07T09:48:17Z")

</div>

filter {  
date {  
match =\> ["id2","UNIX\_MS"]  
target =\> "@timestamp"  
}  
mutate {  
replace =\> { "id2" =\> "%{@timestamp}" }  
lowercase =\> ["id2"]  
}  
jdbc\_streaming {  
jdbc\_driver\_library =\> "/etc/logstash/mysql-connector-java-5.0.8-bin.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mysql:\***"  
jdbc\_user =\> ""  
jdbc\_password =\> "**"  
statement =\> "SELECT `` From `base2`  
parameters =\> {"variable"=\>""}  
target =\> ""  
cache\_expiration =\> 43200.0  
cache\_size =\> 520000  
}

---

<div class="post-metadata">

**Author:** ![nano](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@nano](https://discuss.elastic.co/u/nano)\
**Post date:** [July 7, 2017, 9:48am UTC](https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221/6 "2017-07-07T09:48:23Z")

</div>

split {  
field =\>""  
}  
alter {  
coalesce =\> ["" , "%{[][]}"]  
}

mutate {  
remove\_field =\> [""]  
}  
}  
output {  
stdout {codec =\> rubydebug}  
}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 11, 2017, 6:29pm UTC](https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221/8 "2017-07-11T18:29:52Z")

</div>

Okay. So you're saying that every 10 minutes the query in your jdbc input is run and produces a number of events, even though the `schedule` option is clearly commented out? Have you checked that you don't have any extra files in /etc/logstash/conf.d that Logstash might be reading?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 8, 2017, 6:30pm UTC](https://discuss.elastic.co/t/help-problem-output-using-jdbc-input/92221/9 "2017-08-08T18:30:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
