Using the php-memory commands
You can use the php-memory commands to list or update the PHP memory limits on your Developer Portal.
- Log in as Cloud manager:
apic login --server management_server --realm admin/identity_provider --username cloud_username --password cloud_password
You can determine which identity provider to use in the--realm
parameter by entering the following command to see a list of all available identity providers (you do not need to be logged in to use this command):
For example:apic identity-providers:list --scope admin --server mgmt_endpoint_url --fields title,realm
Theapic identity-providers:list --scope admin --server myserver.com --fields title,realm total_results: 2 results: - title: Cloud Manager User Registry realm: admin/default-idp-1 - title: Corporate LDAP user registry realm: admin/corporate-ldap
title
value should enable you to determine which identity provider to use; you can then copy the corresponding--realm
parameter directly from the displayedrealm
value. For any identity providers that were created by your administrator after API Connect was installed, the names will have been determined at creation time. The default Cloud Manager Local User Registry for login as a member of the cloud administration organization isdefault-idp-1
.For full details of the
apic login
command, see Logging in to a management server. - Get the availability zone of the portal service's sites that you want to
list:
apic availability-zones --org orgid/name --server management_server
- List all the portal services in that availability
zone:
apic portal-services:list --org orgid/name --server management_server --availability-zone availability_zone
- Get the selected portal service's name:
apic portal-services:get --org orgid/name --server management_server --availability-zone availability_zone PORTAL-SERVICE-NAME
- List the current PHP memory limits on the Developer Portal
platform:
apic --mode portaladmin php-memory:list --server management_server --portal_service_name PORTAL-SERVICE-NAME
You receive output like this example:Current web memory is set to: 768M Current admin memory is set to: 768M
- Update the current PHP memory limits on the Developer Portal
platform:
apic --mode portaladmin php-memory:update --server management_server --portal_service_name PORTAL-SERVICE-NAME --memory_value 1024
You receive output like this example:Setting php memory limit to 1024M within the database Setting php memory limit to 1024M in /var/devportal/storenosync/php.ini Setting php memory limit to 1024M in /web/local/php_config/php.ini Done
Note: Consider the memory resource limits that are allocated to your Developer Portal pods
before you set this value. Setting this value too high can result in the portal pods restarting
because the containers request more memory than is allowed by Kubernetes. Setting the value too low
can result in the internal portal processes failing because of lack of available memory.