I’m getting a err:Connection_Reset error when posting a axios request with 1000+ rows.
it works on my test server but not working on the production server
sometimes i get the err:Connection_Reset error on the console
and sometimes i get “This Page can’t be displayed”
this is my code where it send to the API.
public function curlPostRequest(Request $request)
{
$oOutput = Http::withHeaders(['user-username' => Session::get('username')])->withToken(Session::get('rrpm_api_acc_token'))->post($this->sApiRoute, $request->all());
return response($oOutput, $oOutput->status());
}
If I’m only posting like 10-20 rows it’s successfully saved, already set my PHP config same as the test server but still no luck on the production server.
this.axios.post('./rrpm-api/journalVoucher/saveJvDetails', this.third_page_data, config)
.then(response => {
this.loading(false);
if(response.data.code == 0){
let oldthis = this;
setTimeout(function(){
Swal.fire({
icon: 'success',
text: 'Saved!',
showCancelButton: false,
allowOutsideClick: false,
confirmButtonText: 'ok',
}).then((result) => {
if (result.isConfirmed) {
let jv_number = response.data.jv_number;
let jv_date = response.data.jv_date;
let jv_status = response.data.jv_status;
oldthis.directCloseThirdpage('save', jv_number, jv_date, jv_status);
}
})
}, 100, oldthis);
}else{
if(response.data.where){
setTimeout(function() {
Swal.fire({
icon: 'error',
title: 'Message',
text: response.data.where,
})
}, 100);
}else{
setTimeout(function() {
Swal.fire({
icon: 'error',
title: 'Message',
text: response.data.message,
})
}, 100);
}
}
})
.catch(error => {
if(error.response.data.where){
setTimeout(function() {
Swal.fire({
icon: 'error',
title: 'Message',
text: error.response.data.where,
})
}, 100);
}else{
setTimeout(function() {
Swal.fire({
icon: 'error',
title: error.response.statusText,
html: error.response.statusText,
});
}, 100);
}
});