Control Web Panel
Developers => CWP API => Topic started by: talebeiatsiz on December 13, 2019, 06:41:56 PM
-
Hello, I have started a project to create an WHMCS like system with CWP Api, so I was testing the system with my main domain and tried Account > Add function.
Simply, I sent the necessary values as mentioned in
https://docs.control-webpanel.com/docs/developer-tools/api-manager/functions/function-api-account/add
When I curl_exec($ch);
The account is being created but the php file returns with "503 Service Unavailable" code.
I could'nt find what is wrong.
Web Server Conf:
Nginx & Varnish & Apache
Nginx: 80,443
Varnish: 82
Apache: 8181,8443
Domain Settings:
Php:php-fpm
Version Php:7.3
Apache:Yes
Apache Version:2.4
Nginx:Not
Version Nginx:s/n
max_execution_time=120
-
Having same problem.
Did you fixed it ?
-
Did you guys manage to fix that? I'm also having same issue. thanks
-
I am having the exactly same issue :(
-
I investigated this a little bit.
My scenario is:
1. I have an AJAX call for a webserver that is in the same server as the CWP instance
2. This webserver communicate with CWP API for account creation. In other words, I have a PHP script in a CWP account that will use CWP API of its own server to create other accounts.
When the account is created directly with the CWP API, it returns 503 error (I isolated this using postman to communicate directly with CWP API), this is what is the described error in this post.
But, what I noticed is that when I create the account running the AJAX request, this request also returns 503 error. So, it looks like when an account is created using CWP API, the whole server became inaccesible by a small time, and not only the API webserver. This is a major issue for me.
-
probably this issue happens when using the API on the same server and using PHP-FPM as PHP-FPM services restart when creating the new account.
To avoid it you can use another server for billing using API or set that billing uses PHP-CGI.
-
I also get the same error, when I change to another server to send the api it fails to send and returns false