vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Managing Databases for EnterpriseDB Connections 

Connections to your IBM Cloud® Databases for EnterpriseDB deployment use resources, so it is important to consider how many connections you need when tuning your deployment's performance. Databases for EnterpriseDB uses a max_connections setting to limit the number of connections (and resources that are consumed by connections) to prevent run-away connection behavior from overwhelming your deployment's resources.

You can check the value of max_connections with your [admin user](https://cloud.ibm.com/docs/databases-for-enterprisedb?topic=databases-for-enterprisedb-user-managementthe-admin-user) and [psql](https://cloud.ibm.com/docs/databases-for-enterprisedb?topic=databases-for-enterprisedb-connecting-psql).

ibmclouddb=> SHOW max_connections;
max_connections
-----------------
115
(1 row)



 Databases for EnterpriseDB Connection Limits 

At provision, Databases for EnterpriseDB sets the maximum number of connections to your Databases for EnterpriseDB database to 115. 15 connections are reserved for the superuser to maintain the state and integrity of your database, and 100 connections are available for you and your applications. If the number of connections to the database exceeds the 100 connection limit, new connections fail and return an error.

FATAL: remaining connection slots are reserved for
non-replication superuser connections

Exceeding the connection limit for your deployment can cause your database to be unreachable by your applications.

You can check the number of connections to your deployment with the admin user, psql, and pg_stat_database.

SELECT count(distinct(numbackends)) FROM pg_stat_database;

If you need to figure out where the connections are going, you can break down the connections by database.

SELECT datname, numbackends FROM pg_stat_database;

To further investigate connections to a specific database, query pg_stat_activity.

SELECT * FROM pg_stat_activity WHERE datname='ibmclouddb';





 Terminating Connections 

Your admin user has the pg_signal_backend role.
}
session {
session-limit 100;
}
}
}
host-name asloma-e2e-tc15-18-1g-1270-sa-vsrx-vSRX;
name-server {
10.0.80.11;
10.0.80.12;
}
syslog {
user * {
any emergency;
}
file messages {
any any;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
ntp {
server 10.0.77.54;
}
}
security {
log {
mode stream;
report;
}
address-book {
global {
address SL8 10.1.192.0/20;
address SL9 10.1.160.0/20;
address SL4 10.2.128.0/20;
address SL5 10.1.176.0/20;
address SL6 10.1.64.0/19;
address SL7 10.1.96.0/19;
address SL1 10.0.64.0/19;
address SL2 10.1.128.0/19;
address SL3 10.0.86.0/24;
address SL20 10.3.80.0/20;
address SL18 10.2.176.0/20;
address SL19 10.3.64.0/20;
address SL16 10.2.144.0/20;
address SL17 10.2.48.0/20;
address SL14 10.1.208.0/20;
address SL15 10.2.80.0/20;
address SL12 10.2.112.0/20;
address SL13 10.2.160.0/20;
address SL10 10.2.32.0/20;
address SL11 10.2.64.0/20;
whitelist-egress-jobrunner Namespce:schematics-job-runtime, allowed and needed ports for egress TCP = 443, 53, 3000, 3002, and for egress UDP = 443,53. 
 runtime-ingress-job Namespace:schematics-runtime, allowed and needed ports for ingress is 3002. 
 Whitelist-sandbox Namespace:schematics-sandbox, allowed list, and needed ports for ingress = 3000, and for egress TCP = 80, 443, 5986, 22, 53, or egress UDP = 53, 443. 
 Whitelist-runtime-egress-gen-ports Namespace:schematics-runtime, allowed and needed ports for ingress = 3002, and for egress TCP = 80, 443, 5986, 22, 53, 8080, 10250, 9092, 9093, or egress UDP = 53, 443, 10250, 9093, 9093. 



You can customize the network policies by following the steps [editing the default configuration](https://cloud.ibm.com/docs/schematics?topic=schematics-configure-k8s-clusteredit-agent-namespace-confg).





 Default Terraform and Ansible runtime-job 

Following resource limits and replicas are the default configuration applied to the Terraform and Ansible runtime-job namespace.



Terraform and Ansible runtime-job

 Parameter Description 

 resource-limits Resource limit setting for the Terraform and Ansible jobs are cpu = 500m, and memory = 1Gi. 
 replicas Number of Terraform and Ansible job pods. replica = 3. Note when the number of replica is changed, then the JR_MAXJOBS settings must also be updated. 



You can customize by following the steps to [edit the default configuration](https://cloud.ibm.com/docs/schematics?topic=schematics-configure-k8s-clusteredit-agent-namespace-confg).





 Agent job-runner configuration
You can use the ibmcloud hpcs uko vaults command to retrieve the vault UUID.

--limit (int64)
: Optional. The number of resources to retrieve. The value must be between 1 and 1000.

--offset (int64)
: Optional. The number of resources to skip. The minimum value is 0.

--sort ([]string)
: Optional. The sorting order. The default value is ["name"]. The list items must match the regular expression /^-?[a-z0-9_.\[\],-]+$/.

--all-pages (bool)
: Optional. Invoke multiple requests to display all pages of the collection for the associated resources.
* Example

ibmcloud hpcs uko associated-resources-for-managed-key 
--id=93777bca-baef-4070-b9b5-a2e6079df1b4 
--uko-vault=5295ad47-2ce9-43c3-b9e7-e5a9482c362b 
--output json
* Output

The command returns the output similar to the following example:

{
"total_count": 3,
"limit": 20,
"offset": 0,
"first": {
"href": "https://uko.us-south.hs-crypto.cloud.ibm.com:9549/api/v4/managed_key/5295ad47-2ce9-43c3-b9e7-e5a9482c362b/associated_resources?limit=20"
},
"last": {
Performance benchmarking in the PostgreSQL community suggests 500 connections or fewer to be optimal for database performance.

Many PostgreSQL driver libraries have connection pooling classes and functions. You need to consult your driver's documentation to implement connection pooling that is optimal for your use case. For example, the Python driver Psycopg2 has [classes to handle connection pooling in your application](http://initd.org/psycopg/docs/pool.html). The Java PostgreSQL JDBC driver has methods for [connection pooling at both the application and application server level](https://jdbc.postgresql.org/documentation/head/datasource.html).

Alternatively, you can use a third-party tool such as [PgBouncer](https://pgbouncer.github.io/) to manage your application's connections.





 Raising the PostgreSQL Connection Limit 

PostgreSQL allocates some amount of memory on a per connection basis, typically around 5 - 10 MB per connection. It is important to consider the total amount of memory that is available to your deployment before increasing the connection limit. To raise the connection limit, first you might want to [scale your deployment](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-resources-scaling) to ensure that you have enough memory to accommodate more connections.

Next, change the value of max_connections on your deployment.
"first": {
"href": "http://169.254.169.254/v1/placement_groups?limit=50"
},
"limit": 50,
"placement_groups": [
{
"created_at": "2021-10-12T19:55:00Z",
"crn": "crn:...]",
"id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871",
"lifecycle_state": "stable",
"name": "my-placement-group",
"resource_type": "placement_group",
"strategy": "host_spread"
}
],
"total_count": 1
}
Show more

You can also specify details for a single placement group that is used by the instance by making a GET "http://169.254.169.254/metadata/v1/placement_groups/{id}" call and providing the placement group ID.





 Next steps 



* [Access metadata from a running instance](https://cloud.ibm.com/docs/vpc?topic=vpc-imd-access-instance-metadata) and use it to bootstrap new instances.
* [Create and use a trusted profile](https://cloud.ibm.com/docs/vpc?topic=vpc-imd-trusted-profile-metadata) to access IAM-enabled services.
Project ID: 01234567-abcd-abcd-abcd-abcdabcd1111
Age: 3m6s
Created: 2021-06-04T11:56:22-04:00

Image: us.icr.io/mynamespace/myhello_bld
Resource Allocation:
CPU: 1
Ephemeral Storage: 400M
Memory: 4G
Registry Secrets:
myregistry

Runtime:
Array Indices: 1 - 5
Max Execution Time: 7200
Retry Limit: 3

Status:
Completed: 91s
Instance Statuses:
Succeeded: 5
Conditions:
Type Status Last Probe Last Transition
Pending True 96s 96s
Running True 92s 92s
Complete True 91s 91s

Events:
Type Reason Age Source Messages
Normal Updated 93s (x7 over 97s) batch-job-controller Updated JobRun "myhellojob-jobrunb"
Normal Completed 93s batch-job-controller JobRun completed successfully

Instances:
Name Running Status Restarts Age
myhellojob-jobrunb-1-0 0/1 Succeeded 0 97s
myhellojob-jobrunb-2-0 0/1 Succeeded 0 97s
myhellojob-jobrunb-3-0 0/1 Succeeded 0 97s
myhellojob-jobrunb-4-0 0/1 Succeeded 0 97s
myhellojob-jobrunb-5-0 0/1 Succeeded 0 97s

Job runs that are submitted (or resubmitted) with the CLI that do not reference a defined job configuration are not viewable from the console.
"first": {
"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0738-7fd72524-6e2d-49a6-b975-0071efccd89a/connections?limit=10"
},
"limit": 10,
"connections": [
{
"id": "0738-a252d380-0784-45ff-8fc0-c2b58e446b4d",
"name": "vpn-connection-to-vpn-gateway-2",
"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/0738-7fd72524-6e2d-49a6-b975-0071efccd89a/connections/0738-a252d380-0784-45ff-8fc0-c2b58e446b4d",
"local_cidrs":
"192.168.100.0/24"
],
"peer_cidrs":
"192.168.0.0/24"
],
"peer_address": "169.61.161.150",
"admin_state_up": true,
"psk": "VPNDemoPassword",
"dead_peer_detection": {
"action": "none",
"interval": 30,
"timeout": 120
},
"created_at": "2018-07-06T19:50:49.252072Z",
"route_mode": "policy",
"authentication_mode": "psk",
"status": "up"
}
]
}

After the VPN connection is established, you can reach your virtual server instances from the subnets in VPC 1 to the ones in VPC 2, and vice versa.
public-cr96039a75fddb4ad1a09ced6699c88888-alb2 true enabled public 169.xx.xxx.xxx dal12 ingress:1.1.2_2507_iks 2234945 -

 Why it’s happening 

In standard clusters, the first time that you create a cluster in a zone, a public VLAN and a private VLAN in that zone are automatically provisioned for you in your IBM Cloud infrastructure account.

In that zone, 1 public portable subnet is requested on the public VLAN that you specify and 1 private portable subnet is requested on the private VLAN that you specify. For IBM Cloud Kubernetes Service, VLANs have a limit of 40 subnets. If the cluster's VLAN in a zone already reached that limit, the Ingress Subdomain fails to provision and the public Ingress ALB for that zone fails to provision.

To view how many subnets a VLAN has:



1. From the [IBM Cloud infrastructure console](https://cloud.ibm.com/classic?), select Network > IP Management > VLANs.
2. Click the VLAN Number of the VLAN that you used to create your cluster. Review the Subnets section to see whether 40 or more subnets exist.



 How to fix it 

Option 1: If you need a new VLAN, order one by [contacting IBM Cloud support](https://cloud.ibm.com/docs/vlans?topic=vlans-ordering-premium-vlansordering-premium-vlans).

Then, [create a cluster](https://cloud.ibm.com/docs/containers?topic=containers-kubernetes-service-clics_cluster_create) that uses this new VLAN.

Option 2: If you have another VLAN that is available, you can [set up VLAN spanning](https://cloud.ibm.com/docs/vlans?topic=vlans-vlan-spanningvlan-spanning) in your existing cluster.
Without VRF, one VPN connection is enough to see all servers on your account. With VRF, you can access resources only in the market that is associated with your VPN. So if you connect to the DAL VPN, you can connect to DAL servers only.

IBM Cloud ASN is 13884, for public and private services.



* The default ASN for a customer when ordering is 64999, but the default can be changed by customer request.
* Optionally, a 4-byte private ASN 4201000000 - 4201064511 can be supported.
* If you're using Direct Link Connect with a layer-3 service, such as IP VPN, IBM Cloud establishes BGP with the Direct Link Connect provider's ASN.



Recommendations, Defaults, and Limits:



* Tunneling (that is, GRE) is supported and recommended if IP overlap becomes an issue.
* BGP timer defaults are Keepalive:30, Holdtime:90.
* Authentication is not enabled by default.
* BGP BFD is not enabled by default.
* Maximum received (from customer or provider) prefix limit is 200 per VRF.







 Strict limitations on IP assignments 



* If you use the 10.x.x.x network, you still cannot create overlap with your hosts within IBM Cloud nor with the IBM Cloud services network, which occupies 10.0.0.0/14, 10.198.0.0/15, and 10.200.0.0/14.
* The following ranges are not allowed in the Federal system and they are rejected by IBM servers: 169.254.0.0/16, 224.0.0.0/4.







 Redundancy and diversity 

IBM Cloud Direct Link provides diversity, and customers are responsible for implementing redundancy through their BGP schemas.

If you select ECMP for redundancy, both BGP sessions must exist on the same XCR; therefore, you give up router diversity and are exposed to risk if the router fails. You gain Layer-3 redundancy, but you lose router diversity.





 More about using VRF 

All accounts that use an IBM Cloud Direct Link solution must migrate to a VRF.
Valid values are all, saved, and new. If not set defaults to saved. || --limit or -l | Optional | Maximum number of workspaces to list. Ignored if a negative number is set. The number must be a positive integer between 1 and 200. The default value is -1. || --offsetor -m | Optional | Offset in list. Ignored if a negative number is set. The default value is -1. || --output or -o | Optional | Returns the command-line output in JSON format. Currently only JSON file format is supported. |<-- </table ""> -->Example ibmcloud schematics agents list
<-- </section "id="section-schematics-agents-list" "> --><-- <section "id="section-schematics-agent-register" "> --> ibmcloud schematics agents register Register the Agent with Schematics to run your workspace jobs on your Agent infrastructure. For more information about Agent infrastructure, see Installing Schematics Agent]Schematics Agents beta_-0] .Syntax ibmcloud schematics agents register --name AGENT_NAME --profile-id PROFILE_ID --agent-location AGENT_LOCATION --location LOCATION --description DESCRIPTION] --resource-group RESOURCE_GROUP] --tags TAGS] --file FILE] --output OUTPUT] --no-prompt] !
"id": "acf9af98-a459-4ef1-9c64-6cd987187cb5",
"label_in_keystore": "AWS-KMS-KEY",
"type": "secret_key",
"keystore": {
"group": "Production",
"type": "aws_kms"
}
}
],
"href": "https://uko.us-south.hs-crypto.cloud.ibm.com:9549/api/v4/managed_keys/c2d8d0ee-c333-414f-8e64-af47320e5a46"
}
]
}







 hpcs uko vaults 

List all vaults in the instance.

If the --all-pages option is not set, the command only retrieves a single page of the collection.

ibmcloud hpcs uko vaults [--limit LIMIT] [--offset OFFSET] [--sort SORT] [--name NAME] [--description DESCRIPTION]



* Command options

--limit (int64)
: Optional. The number of vaults to retrieve. The maximum value is 1000. The minimum value is 1.

--offset (int64)
: Optional. The number of vaults to skip. The minimum value is 0.

--sort ([]string)
: Optional. The sorting order. The default value is ["-updated_at"]. The list items must match the regular expression /^-?[a-z0-9_.\[\],-]+$/.

--name (string)
: Optional. Return only vaults whose names begin with the string. The length must be between 1 and 100 characters. The value must match the regular expression /.+/.

--description (string)
: Optional. Return only vaults whose description contains the string. The length is must be between 1 and 200 characters.
Debugging apps 

Use the troubleshooting tips to learn how to troubleshoot IBM Cloud® Code Engine applications.

When your app isn't behaving as expected, looking at logs and system events can provide information that might help you debug the problem.



 App limits to consider 

The maximum number of apps that you can create per project is 40. You are limited to a total of 120 revisions for all apps per project. Code Engine retains only the latest inactive revision of your application in addition to your active app revision. Older revisions are deleted. See [Updating apps](https://cloud.ibm.com/docs/codeengine?topic=codeengine-update-app).

For more information about limits for apps including memory and CPU, see [Limits and quotas for Code Engine](https://cloud.ibm.com/docs/codeengine?topic=codeengine-limits).





 Confirm port value 

Code Engine requires that you have an HTTP endpoint that Code Engine uses to check the health of your app.

By default, Code Engine assumes that apps listen for incoming connections on port 8080. In addition, Code Engine sets the PORT environment variable to the port value that the application is expected to be listening on. If your app needs to listen on a port other than port 8080, either deploy your app from the console and specify the correct port or use the --port option on the app create command. For more information about environment variables that are set by Code Engine, see [Automatically injected environment variables](https://cloud.ibm.com/docs/codeengine?topic=codeengine-inside-env-vars). The following ports are reserved by Code Engine: 8022, 8008, 8012, 9090, 9091, and 15090. Only one port can be exposed as the listening port.





 Getting logs for my apps 

Logs can be helpful to troubleshoot problems when you run apps. You can view app logs from the console or with the CLI.

When you view logs from the console, you must create an IBM Log Analysis instance in the same region as your Code Engine project.
* 192.168.0.1/32
* 192.168.0.2/32
* 192.168.0.3/32







 Only maximum (LE) matching length specified 

The route filter with prefix 192.168.0.0/16 and LE 19 will match the following subnets (minimum matching length is considered 16):



* 192.168.0.0/16
* 192.168.0.0/17
* 192.168.128.0/17
* 192.168.0.0/18
* 192.168.64.0/18
* 192.168.128.0/18
* 192.168.192.0/18
* 192.168.32.0/19
* 192.168.64.0/19
* 192.168.96.0/19
* 192.168.128.0/19
* 192.168.160.0/19
* 192.168.192.0/19
* 192.168.224.0/19
To get the total number of policies for a specific subject, you can use the [IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started):

Log in, and select your account to run the appropriate CLI command. You might want to install jq to format JSON in the CLI output.

To get count of policies for a service ID:

ibmcloud iam service-policies <service-id> -f --output JSON | jq '. | length'

To get count of policies for a username(email):

ibmcloud iam user-policies <username> -f --output JSON | jq '. | length'

To get count of policies for an access group ID:

ibmcloud iam access-group-policies <access-group> -f --output JSON | jq '. | length'

Install jq to format the JSON. The filter | jq '. | length' counts the number of policies in the account. Without this, a list of all policies returns.







 Managing rule limits 

If you aren't sure how many context-based restricitons rules are in your account, and you want to ensure that you avoid reaching the limit, you can check how many rules are in your account and work to reduce policies as you approach the limit.

You must be the account owner or administrator for All Account Management services and All Identity and Access enabled services to check how many rules exist in the account.



 Viewing the total number of rules per account by using the API 

To get the total number of rules per account, use the Context-based restrictions API:



1. Log in to IBM Cloud® CLI. If you have multiple accounts, you are prompted to select which account to use. If you do not specify a region with the -r flag, you must also select a region.

ibmcloud login

If your credentials are rejected, you might be using a federated ID. To log in with a federated ID, use the --sso flag.
* Updates Go to version 1.19.7.







 Revision 4, released 21 March 2023 



* Resolves the following CVEs: [CVE-2023-23916](https://nvd.nist.gov/vuln/detail/CVE-2023-23916)
* Updates the UBI to version 8.7-1085.
* Updates Go to version 1.19.6.







 Revision 3, released 06 March 2023 



* Resolves the following CVEs: [CVE-2022-4415](https://nvd.nist.gov/vuln/detail/CVE-2022-4415)[CVE-2020-10735](https://nvd.nist.gov/vuln/detail/CVE-2020-10735)[CVE-2021-28861](https://nvd.nist.gov/vuln/detail/CVE-2021-28861)[CVE-2022-45061](https://nvd.nist.gov/vuln/detail/CVE-2022-45061)[CVE-2022-40897](https://nvd.nist.gov/vuln/detail/CVE-2022-40897)[CVE-2022-41723](https://nvd.nist.gov/vuln/detail/CVE-2022-41723)[CVE-2022-41724](https://nvd.nist.gov/vuln/detail/CVE-2022-41724)
* Updates the UBI to version 8.7-1085.
* Updates Go to version 1.19.6.
* Sets the default values for CPU limit & Memory limit to 500m & 500Mi respectively.







 Revision 2, released 20 February 2023 



* Resolves the following CVEs: [CVE-2022-47629](https://nvd.nist.gov/vuln/detail/CVE-2022-47629)
* Updates Go to version 1.19.7.







 Revision 21, released 21 March 2023 



* Resolves the following CVEs: [CVE-2023-23916](https://nvd.nist.gov/vuln/detail/CVE-2023-23916)
* Updates the UBI to version 8.7-1085.
* Updates Go to version 1.19.6.







 Revision 20, released 06 March 2023 



* Resolves the following CVEs: [CVE-2022-4415](https://nvd.nist.gov/vuln/detail/CVE-2022-4415)[CVE-2020-10735](https://nvd.nist.gov/vuln/detail/CVE-2020-10735)[CVE-2021-28861](https://nvd.nist.gov/vuln/detail/CVE-2021-28861)[CVE-2022-45061](https://nvd.nist.gov/vuln/detail/CVE-2022-45061)[CVE-2022-40897](https://nvd.nist.gov/vuln/detail/CVE-2022-40897)[CVE-2022-41723](https://nvd.nist.gov/vuln/detail/CVE-2022-41723)[CVE-2022-41724](https://nvd.nist.gov/vuln/detail/CVE-2022-41724)
* Updates the UBI to version 8.7-1085.
* Updates Go to version 1.19.6.
* Sets the default values for CPU limit & Memory limit to 500m & 500Mi respectively.







 Revision 19, released 20 February 2023 



* Resolves the following CVEs: [CVE-2022-47629](https://nvd.nist.gov/vuln/detail/CVE-2022-47629)
* Updates Go to version 1.19.7.







 Revision 15, released 21 March 2023 



* Resolves the following CVEs: [CVE-2023-23916](https://nvd.nist.gov/vuln/detail/CVE-2023-23916)
* Updates the UBI to version 8.7-1085.
* Updates Go to version 1.19.6.







 Revision 14, released 06 March 2023 



* Resolves the following CVEs: [CVE-2022-4415](https://nvd.nist.gov/vuln/detail/CVE-2022-4415)[CVE-2020-10735](https://nvd.nist.gov/vuln/detail/CVE-2020-10735)[CVE-2021-28861](https://nvd.nist.gov/vuln/detail/CVE-2021-28861)[CVE-2022-45061](https://nvd.nist.gov/vuln/detail/CVE-2022-45061)[CVE-2022-40897](https://nvd.nist.gov/vuln/detail/CVE-2022-40897)[CVE-2022-41723](https://nvd.nist.gov/vuln/detail/CVE-2022-41723)[CVE-2022-41724](https://nvd.nist.gov/vuln/detail/CVE-2022-41724)
* Updates the UBI to version 8.7-1085.
* Updates Go to version 1.19.6.
* Sets the default values for CPU limit & Memory limit to 500m & 500Mi respectively.







 Revision 13, released 20 February 2023 



* Resolves the following CVEs: [CVE-2022-47629](https://nvd.nist.gov/vuln/detail/CVE-2022-47629)
"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/199d78ec-b971-4a5c-a904-8f37ae710c63/mount_targets?limit=50"
},
"limit": 50,
"mount_targets": [
{
"access_control_mode": "security_group",
"created_at": "2023-07-05T01:59:46.000Z",
"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/199d78ec-b971-4a5c-a904-8f37ae710c63/mount_targets/r134-1b5571cb-536d-48d0-8452-81c05c6f7b80",
"id": "r134-1b5571cb-536d-48d0-8452-81c05c6f7b80",
"lifecycle_reasons": ],
"lifecycle_state": "stable",
"mount_path": "fsf-dal1099a-fz.adn.networklayer.com:/nxg_s_voll_mz0716_a4cc07a3_4425_4adf_aed6_0d7e142bee0c",
"name": "my-target",
"primary_ip": {
"address": "192.0.2.0",
"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/35984145-9c3a-4626-8ee7-52c7a8742752/reserved_ips/0716-6fd4925d-7774-4e87-829e-7e5765d454ad",