# Passing bulk data from ansible uri module to service and gettings status code -1  error

**URL:** <https://forum.ansible.com/t/passing-bulk-data-from-ansible-uri-module-to-service-and-gettings-status-code-1-error/32571>\
**Category:** Ansible Project\
**Created:** [March 31, 2020, 10:25am UTC](https://forum.ansible.com/t/passing-bulk-data-from-ansible-uri-module-to-service-and-gettings-status-code-1-error/32571 "2020-03-31T10:25:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diyawary](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Diyawary](https://forum.ansible.com/u/Diyawary)\
**Post date:** [March 31, 2020, 10:25am UTC](https://forum.ansible.com/t/passing-bulk-data-from-ansible-uri-module-to-service-and-gettings-status-code-1-error/32571/1 "2020-03-31T10:25:45Z")

</div>

I am sending some 4500 lines data from Ansible to snow table via uri module. however 4100 records updated to snow table rest of the data did not updated this job runs around 122 or 123 sec and throw below error. less amount of data is updated properly .

**Status code was -1 and not [200]: Connection failure: connection was closed before a valid response was received: ‘’**

In my code I have already increased the timeout value- to 500 sec

url:  
method: POST  
user: “{{ snow\_username }}”  
password: “{{ snow\_password }}”  
body: ‘{“List”:{{list\_item}}, “Region”: X - DEV " }’  
body\_format: json  
force\_basic\_auth: yes  
status\_code: 200  
timeout: 500

Please suggest how can resolved this issue asap.  
Appriciate your help in adavance

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [March 31, 2020, 10:35am UTC](https://forum.ansible.com/t/passing-bulk-data-from-ansible-uri-module-to-service-and-gettings-status-code-1-error/32571/2 "2020-03-31T10:35:55Z")

</div>

> I am sending some 4500 lines data from Ansible to snow table via uri module. however 4100 records updated to snow table  
> rest of the data did not updated this job runs around 122 or 123 sec and throw below error. less amount of data is  
> updated properly .  
> \*  
> \*  
> \*Status code was -1 and not [200]: Connection failure: connection was closed before a valid response was received: ''\*
> 
> In my code I have already increased the timeout value- to 500 sec  
> url:  
> method: POST  
> user: "{{ snow\_username }}"  
> password: "{{ snow\_password }}"  
> body: '{"List":{{list\_item}}, "Region": X - DEV " }'  
> body\_format: json  
> force\_basic\_auth: yes  
> status\_code: 200  
> timeout: 500  
> Please suggest how can resolved this issue asap.  
> Appriciate your help in adavance

My interpretation of the error message would be that the URL endpoint closed the connection, so increasing the  
timeout on Ansible's side doesn't help.

It is likely that the URL endpoint ran into a timeout. Maybe you could breakdown the data in several batches.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Diyawary](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Diyawary](https://forum.ansible.com/u/Diyawary)\
**Post date:** [March 31, 2020, 11:19am UTC](https://forum.ansible.com/t/passing-bulk-data-from-ansible-uri-module-to-service-and-gettings-status-code-1-error/32571/3 "2020-03-31T11:19:22Z")

</div>

Thanks For Reply Racke, I have checked with the snow guy and there side has no time limtiation for connection close and they are saying as below-

There are no properties restricting how long SNOW will take to respond. Response time restrictions are usually placed on the calling application, not the receiving application.

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [March 31, 2020, 11:54am UTC](https://forum.ansible.com/t/passing-bulk-data-from-ansible-uri-module-to-service-and-gettings-status-code-1-error/32571/4 "2020-03-31T11:54:47Z")

</div>

> Thanks For Reply Racke, I have checked with the snow guy and there side has no time limtiation for connection close and  
> they are saying as below-
> 
> There are no properties restricting how long SNOW will take to respond. Response time restrictions are usually placed on  
> the calling application, not the receiving application.

If the operation is running into Ansible's timeout, it would be a different message. "Something like The read operation  
timed out".

In my opinion this is a local problem and pretty much offtopic now.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Diyawary](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Diyawary](https://forum.ansible.com/u/Diyawary)\
**Post date:** [May 12, 2020, 4:30pm UTC](https://forum.ansible.com/t/passing-bulk-data-from-ansible-uri-module-to-service-and-gettings-status-code-1-error/32571/5 "2020-05-12T16:30:36Z")

</div>

i Racke,

I am getting (‘The read operation timed out’,) error when sending data from ansible to snow even for some 300 lines also . could you please suggest how this can be isolate?

---

<div class="post-metadata">

**Author:** ![Diyawary](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Diyawary](https://forum.ansible.com/u/Diyawary)\
**Post date:** [May 14, 2020, 3:42pm UTC](https://forum.ansible.com/t/passing-bulk-data-from-ansible-uri-module-to-service-and-gettings-status-code-1-error/32571/6 "2020-05-14T15:42:19Z")

</div>

Hi Team,

I am getting ('The read operation timed out',) error when sending data from ansible to snow even for some 300 lines also . could you please suggest how this can be resolved.
