REST API post times out when content is too large
-
On my production WordPress site, when I try to post via the REST API and the post is over 852 characters, I get Error: socket hang up. If it’s 852 characters or less, it posts.
This only happens when I post from my Meteor Cloud Server. I don’t have this issue posting from my local machine. I also pulled the production site to a staging server and do not have this issue. So it only comes up when posting from my Meteor Cloud Server to the Production WordPress Site
I tried:
created .user.ini and added post_max_size = 64M
Whitelisted IPs on Wordfence
Turned off plugins
Updated Theme
Godaddy – no issue they can see
Set Header Content-Lengthconst result = await wp.posts() .setHeaders({ 'Content-Type': 'application/json', Authorization: Bearer myToken, 'Content-Length': JSON.stringify(postValues).length, }) .create(JSON.stringify(postValues));
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘REST API post times out when content is too large’ is closed to new replies.