0

I'm using themosis – a framework for wordpress that works pretty well. Also I use WP-API - that doesn't work so great.

All versions are the latest stables and the Server is using PHP 5.5

On calling that API route:

posts?filter[order]=ASC&filter[orderby]=name&filter[posts_per_page]=-1&type=products

I'm getting an Internal Server error / HTTP 500

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@example.ch and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

So my hoster checked the logs and the only lines caused by this error were:

[Tue Jul 07 17:43:13 2015] [error] Premature end of script headers: php55-fcgi-starter.fcgi, referer: {myurl/mypath}

I checked all log, forced everything to display errors & logs, but no PHP errors - not even notices... (set display_errors to On and error_reporting to 2039 - with htaccess and php-side (wordpress index.php)


I just figured out that when I set the post_per_page filter is set to e.g. 90 it works, but only till a specific post.

All posts are "normal" - making a WP_Query also delivers all results without any issues.


I also increased the php memory_limit to more than enough and tested it locally (Mac OS / MAMP) what works great.

I really can't find any reason why this is happening. My server hoster support (which is really good actually) says also that all systems run fine

pnuts
  • 58,317
  • 11
  • 87
  • 139
CodeBrauer
  • 2,690
  • 1
  • 26
  • 51
  • Are you running out of memory on the query, or perhaps running past your script execution limit? – drmarvelous Jul 09 '15 at 14:11
  • @drmarvelous The whole request just takes 800ms, the php max execution time is set to 30s – php memory limit is set to temp. 1G what also didnt solve the error – CodeBrauer Jul 09 '15 at 14:15
  • Just found a bug in the WP-API plugin: https://github.com/WP-API/WP-API/issues/1404 – CodeBrauer Jul 15 '15 at 10:08

0 Answers0