Unpivot Causing Logstash Pipeline to Halt

I am trying to create an Elasticsearch index from an SQL database. However, whenever our SQL query contains an unpivot operation, the process halts after processing a certain number of records. It then resumes after 30-40 minutes, but I am unsure why this is happening. Below is a screenshot showing what the pipeline displays after it gets halted.

Any Solution?