13,000 users is far too many to return at once. You are hitting a PHP memory limit, which is causing the 500 error.
Currently, the pagination and return limits that work for normal records calls is not being applied to
/system/user/. This is a bug that @leehicks has already fixed, and the fix will be included in the next release.
Other records calls are currently paginated according to the
dsp.db_max_records_returned parameter in the PHP config. For instance, with an API call with parameter
?limit=10000 the system will return the first 1000 records as “Page 1” to prevent high memory usage. This parameter is found in
/** The default number of records to return at once for database queries */
'dsp.db_max_records_returned' => 1000,
/system/user/ are not honoring this setting, but this will be resolved in the next release. For your convenience, I have created GitHub Issue #56 for this bug. You may subscribe to the GitHub Issue so you’re notified when it’s included in a release.