Softlayer API: Listing virtual servers times out with Internal Error

126 Views Asked by At

When using slcli to list virtual servers in a Softlayer account:

slcli vm list

it takes a long time and eventually produces the following error:

SoftLayerAPIError(SOAP-ENV:Server): Internal Error

This used to work in the same account. Listing VMs in specific data centers works OK still which makes me think that I'm hitting some built-in limit on the number of objects that can be returned... Is there a limit and if there is what is it?

2

There are 2 best solutions below

1
p. joshi On BEST ANSWER

If there was a limit, I believe you would have seen an error/notification. The request times out when it tries to return a huge amount of records. As mentioned earlier try using the limit switch to limit the number of records or use filters. This article speaks more about filters.

https://sldn.softlayer.com/article/object-filters

1
F.Ojeda On

There is no documentation that shows us the limit.

You can see the following documentation: https://softlayer-api-python-client.readthedocs.io/en/latest/cli/

• But to get the data of vms by slcli a solution could be to increase the timeout.

Use this command to increase the timeout:

slcli setup

First you have to insert the user data, e.g username, apiKey and the timeout.

• Or you can use a result limit.

Use the following command:

slcli --format json call-api Account getVirtualGuests --limit 10

change the limit value for the amount that you want.