문제

나는 우위 데이터베이스 PHP 확장자의 버그로 보이는 것처럼 보이고 있습니다 (알고, 알고 있습니다 ...). 나는 그것을 버그로보고했지만 여전히 아무것도 듣지 못했기 때문에 너희들이 그것을 실행할 것이라고 생각했다.

작업 코드 :

for ($i = 0; $i < 100; $i++)
{
    $connection = ads_connect( 'DataDirectory=\\some\path\;ServerTypes=2;RightsChecking=Off;TrimTrailingSpaces=true;CommType=TCP_IP;', '', '' );

    $results = ads_do( $connection , 'SELECT TOP 1 * FROM projects');

    ads_close( $connection );
}

이것은 단지 100 회 반복되고 DB에 연결하고 쿼리를 실행하고 연결을 끊습니다.

비 작업 코드 :

for ($i = 0; $i < 100; $i++)
{
    $connection = ads_connect( 'DataDirectory=\\some\path\;ServerTypes=2;RightsChecking=Off;TrimTrailingSpaces=true;CommType=TCP_IP;', '', '' );

    $results = ads_do( $connection , 'SELECT TOP 1 * FROM projects');
    $results = ads_do( $connection , 'SELECT TOP 1 * FROM projects');

    ads_close( $connection );
}

두 번째 쿼리 실행에 주목하십니까? 이 루프는 51 번째 사이클에서 실패합니다 (DB 서버는 각 응용 프로그램이 오류와 함께 50 개의 동시 연결로 제한)

오류 6303 : 최대 우위 데이터베이스 서버 연결이 초과되었습니다.

나는 성공하지 못한 채 이것을 포함하여 다른 몇 가지를 시도했습니다.

for ($i = 0; $i < 100; $i++)
{
    $connection = ads_connect( 'DataDirectory=\\some\path\;ServerTypes=2;RightsChecking=Off;TrimTrailingSpaces=true;CommType=TCP_IP;', '', '' );

    $results = ads_do( $connection , 'SELECT TOP 1 * FROM projects');
    ads_free_result( $results );

    $results = ads_do( $connection , 'SELECT TOP 1 * FROM projects');
    ads_free_result( $results );

    ads_close( $connection );
}

그러나 이것은 하다 문제를 해결하면 두 쿼리가 여전히 성공적으로 정확하게 실행됩니다 !!

for ($i = 0; $i < 100; $i++)
{
    $connection = ads_connect( 'DataDirectory=\\some\path\;ServerTypes=2;RightsChecking=Off;TrimTrailingSpaces=true;CommType=TCP_IP;', '', '' );

    $results = ads_do( $connection , 'SELECT TOP 1 * FROM projects');
    ads_close( $connection );

    $results = ads_do( $connection , 'SELECT TOP 1 * FROM projects');
    ads_close( $connection );   
}

이 모든 것이 나에게 매우 이상해 보입니다 ... 어떤 아이디어?

편집하다: PHP 5.2.5 및 ADS 8.1에 있습니다

도움이 되었습니까?

해결책

지식 기반에는 6303 오류에 대한이 항목이 있으며 클라이언트에서 가능한 연결 수를 늘리는 방법 http://devzone.advantagedatabase.com/dz/content.aspx?key=17&refno=981124-0621. R & D는 현재이 문제를 조사하고 다음 서비스 릴리스에서 해결하기 위해 노력하고 있습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top