Error :

sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30.00

Reason :

The timeout occurs due to the open connection.

  • You must ensure that your sessions are closed; otherwise, they will keep your connections open and never return to the pool.
  • log your pool status at some points, so that you can see how many connections are open.

To close sessions:

db.session.commit()

--

--

Requirement :

Create a table if non existent and enable TTL for a table via Cloud-formation.

Explanation :

Reference [1] will provide insight to install the requirements and build a sample project. Add the following code to the template.yaml file

AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: >
Parameters:
AppName:
Type: String
Default: ii-app
Stage:
Type: String
Default: dev
Resources:##### DynamoDB specification for Internal integration metadata #####InternalIntegrationMetadata:
Type: AWS::DynamoDB::Table
DeletionPolicy: Retain
Properties:
TableName: "internal_integration_metadata"
TableClass: STANDARD
BillingMode: PROVISIONED
AttributeDefinitions:
- AttributeName: RequestId
AttributeType: S
- AttributeName: Key
AttributeType: S
- AttributeName: Value
AttributeType: S
- AttributeName: ExpirationDate
AttributeType: N
KeySchema:
- AttributeName: RequestId
KeyType: "HASH"
ProvisionedThroughput:
ReadCapacityUnits: 2
WriteCapacityUnits: 2
TimeToLiveSpecification:
AttributeName: ExpirationDate
Enabled: True

References :

  1. https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started.html
  2. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-timetolivespecification.html
  3. https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/setup-credentials.html
  4. https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

--

--

Issue : Following is a build error received when building a CAR project.

[ERROR] Failed to execute goal org.wso2.maven:wso2-esb-api-plugin:2.1.0:pom-gen (api) on project TESTESB: Execution api of goal org.wso2.maven:wso2-esb-api-plugin:2.1.0:pom-gen failed: A required class was missing while executing org.wso2.maven:wso2-esb-api-plugin:2.1.0:pom-gen: javax/activation/DataSource
[ERROR] -----------------------------------------------------
[ERROR] realm = extension>org.wso2.maven:wso2-esb-api-plugin:2.1.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

--

--

Issue : Following is an error received when connecting PostgreSQL and Flutter. The error occurs when trying to connect through the android emulator in a development environment.

E/flutter ( 8084): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = localhost, port = 43992

Solution :

  1. Make…

--

--

Given the following soap message the use case it to extract only the elements of the body (exclude the soap envelope and body tags). Following is the XML message in which the content is needed to be extracted from.

<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">    <soapenv:Body>       
<AuditMessage>
<EventIdentification EventActionCode="U" EventDateTime="not specialized" EventOutcomeIndicator="not specialized">
</AuditMessage>
</soapenv:Body>
</soapenv:Envelope>

Use the following expression to extract the content in the body

<property expression="$body/*" name="syslogMessage"
scope="default" type="STRING"
xmlns:m0="http://services.samples"
xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2="http://org.apache.synapse/xsd"/>

The output is as follows,

<AuditMessage>          
<EventIdentification EventActionCode="U" EventDateTime="not specialized" EventOutcomeIndicator="not specialized">
</AuditMessage>

--

--