Languages

Menu
Sites
Language
[Tizen-Downloader] - Cannot construct HttpSession: E_MAX_EXCEEDED

 

Hi all,
 
-The problem when i trying to download data and loop about 300 times, but it can start 9 times and "E_MAX_EXCEEDED". How to refresh thread and continues to download.
-And how to start multi thread, i tried multi threads but after completing downloading the threads didn't stop.
Function:
for(int j = 0; j < 300; j++)
{
   AppLog("thread MainForm::-------------------------------------------------%d",j);
   pRequestThread->DownloadFeed(feedUrl, isStringNameFile[j]);
   pRequestThread->Start();
   pRequestThread->Join();
}
 
FeedRequestThread.cpp:
04-18 16:47:58.875 : INFO / Cube ( 7085 : 7089 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:47:58.950 : ERROR / Tizen::Net ( 7085 : 7089 ) : static Tizen::Base::String Tizen::Net::_NetAccountManagerImpl::GetInternetProfileName() (624). > [E_INVALID_ACCOUNT] Internet profile is not found.

04-18 16:47:58.980 : ERROR / Tizen::Net ( 7085 : 7089 ) : static Tizen::Base::String Tizen::Net::_NetAccountManagerImpl::GetMmsProfileName() (705). > [E_INVALID_ACCOUNT] MMS profile is not found.

04-18 16:47:59.150 : INFO / Cube ( 7085 : 7089 ) : virtual bool FeedRequestThread::OnStart() (95). > HTTP Request started

04-18 16:47:59.255 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (326). > thread MainForm::UpdateFeed -- timer() -1095073672

04-18 16:47:59.255 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (327). > thread MainForm::UpdateFeed -- Join

04-18 16:47:59.255 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (330). > thread MainForm::UpdateFeed -- Stop

04-18 16:47:59.255 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------0

04-18 16:47:59.260 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:47:59.260 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:47:59.260 : INFO / Cube ( 7085 : 7093 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:47:59.270 : INFO / Cube ( 7085 : 7093 ) : virtual bool FeedRequestThread::OnStart() (95). > HTTP Request started

04-18 16:47:59.360 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (346). > thread MainForm::UpdateFeed -- timer2() -1095073672

04-18 16:47:59.360 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (347). > thread MainForm::UpdateFeed -- Join2

04-18 16:47:59.360 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (348). > thread MainForm::UpdateFeed -- Stop2

04-18 16:47:59.360 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------1

04-18 16:47:59.360 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:47:59.360 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:47:59.360 : INFO / Cube ( 7085 : 7094 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:47:59.370 : INFO / Cube ( 7085 : 7094 ) : virtual bool FeedRequestThread::OnStart() (95). > HTTP Request started

04-18 16:47:59.460 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (346). > thread MainForm::UpdateFeed -- timer2() -1095073672

04-18 16:47:59.460 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (347). > thread MainForm::UpdateFeed -- Join2

04-18 16:47:59.460 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (348). > thread MainForm::UpdateFeed -- Stop2

04-18 16:47:59.460 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------2

04-18 16:47:59.460 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:47:59.460 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:47:59.465 : INFO / Cube ( 7085 : 7095 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:47:59.475 : INFO / Cube ( 7085 : 7095 ) : virtual bool FeedRequestThread::OnStart() (95). > HTTP Request started

04-18 16:47:59.555 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (346). > thread MainForm::UpdateFeed -- timer2() -1095073672

04-18 16:47:59.555 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (347). > thread MainForm::UpdateFeed -- Join2

04-18 16:47:59.555 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (348). > thread MainForm::UpdateFeed -- Stop2

04-18 16:47:59.555 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------3

04-18 16:47:59.555 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:47:59.555 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:47:59.555 : INFO / Cube ( 7085 : 7096 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:47:59.565 : INFO / Cube ( 7085 : 7096 ) : virtual bool FeedRequestThread::OnStart() (95). > HTTP Request started

04-18 16:47:59.660 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (346). > thread MainForm::UpdateFeed -- timer2() -1095073672

04-18 16:47:59.660 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (347). > thread MainForm::UpdateFeed -- Join2

04-18 16:47:59.660 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (348). > thread MainForm::UpdateFeed -- Stop2

04-18 16:47:59.660 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------4

04-18 16:47:59.660 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:47:59.660 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:47:59.660 : INFO / Cube ( 7085 : 7097 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:47:59.675 : INFO / Cube ( 7085 : 7097 ) : virtual bool FeedRequestThread::OnStart() (95). > HTTP Request started

04-18 16:47:59.765 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (346). > thread MainForm::UpdateFeed -- timer2() -1095073672

04-18 16:47:59.765 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (347). > thread MainForm::UpdateFeed -- Join2

04-18 16:47:59.765 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (348). > thread MainForm::UpdateFeed -- Stop2

04-18 16:47:59.765 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------5

04-18 16:47:59.765 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:47:59.765 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:47:59.765 : INFO / Cube ( 7085 : 7098 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:47:59.775 : INFO / Cube ( 7085 : 7098 ) : virtual bool FeedRequestThread::OnStart() (95). > HTTP Request started

04-18 16:47:59.860 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (346). > thread MainForm::UpdateFeed -- timer2() -1095073672

04-18 16:47:59.860 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (347). > thread MainForm::UpdateFeed -- Join2

04-18 16:47:59.860 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (348). > thread MainForm::UpdateFeed -- Stop2

04-18 16:47:59.860 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------6

04-18 16:47:59.860 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:47:59.860 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:47:59.860 : INFO / Cube ( 7085 : 7099 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:47:59.875 : INFO / Cube ( 7085 : 7099 ) : virtual bool FeedRequestThread::OnStart() (95). > HTTP Request started

04-18 16:47:59.955 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (346). > thread MainForm::UpdateFeed -- timer2() -1095073672

04-18 16:47:59.955 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (347). > thread MainForm::UpdateFeed -- Join2

04-18 16:47:59.955 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (348). > thread MainForm::UpdateFeed -- Stop2

04-18 16:47:59.955 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------7

04-18 16:47:59.955 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:47:59.955 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:47:59.955 : INFO / Cube ( 7085 : 7100 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:47:59.970 : INFO / Cube ( 7085 : 7100 ) : virtual bool FeedRequestThread::OnStart() (95). > HTTP Request started

04-18 16:48:00.070 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (346). > thread MainForm::UpdateFeed -- timer2() -1095073672

04-18 16:48:00.070 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (347). > thread MainForm::UpdateFeed -- Join2

04-18 16:48:00.070 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (348). > thread MainForm::UpdateFeed -- Stop2

04-18 16:48:00.070 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------8

04-18 16:48:00.070 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:48:00.070 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:48:00.070 : INFO / Cube ( 7085 : 7101 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:48:00.180 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (346). > thread MainForm::UpdateFeed -- timer2() -1095073672

04-18 16:48:00.180 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (347). > thread MainForm::UpdateFeed -- Join2

04-18 16:48:00.180 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (348). > thread MainForm::UpdateFeed -- Stop2

04-18 16:48:00.180 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (335). > thread MainForm::-------------------------------------------------9

04-18 16:48:00.180 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (342). > thread MainForm::UpdateFeed -- DownloadFeed2

04-18 16:48:00.180 : INFO / Cube ( 7085 : 7085 ) : void Installer::UpdateFeed() (344). > thread MainForm::UpdateFeed -- start2

04-18 16:48:00.180 : INFO / Cube ( 7085 : 7102 ) : virtual bool FeedRequestThread::OnStart() (57). > Starting FeedRequestThread

04-18 16:48:00.180 : ERROR / Tizen::Net::Http ( 7085 : 7102 ) : result Tizen::Net::Http::_HttpSessionImpl::Construct(Tizen::Net::Http::NetHttpSessionMode, const Tizen::Base::String*, const Tizen::Base::String&, const Tizen::Net::Http::HttpHeader*, Tizen::Net::Http::NetHttpCookieFlag) (232). > [E_MAX_EXCEEDED] The number of currently opened sessions have exceeded the maximum limit(10).

04-18 16:48:00.180 : ERROR / Tizen::Net::Http ( 7085 : 7102 ) : result Tizen::Net::Http::HttpSession::Construct(Tizen::Net::Http::NetHttpSessionMode, const Tizen::Base::String*, const Tizen::Base::String&, const Tizen::Net::Http::HttpHeader*, Tizen::Net::Http::NetHttpCookieFlag) (72). > [E_MAX_EXCEEDED] Propagating.

04-18 16:48:00.180 : INFO / Cube ( 7085 : 7102 ) : virtual bool FeedRequestThread::OnStart() (68). > Cannot construct HttpSession: E_MAX_EXCEEDED
Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

4 Replies
bring close
Refresh ##
wil smith
Ensure the number of opened sessions never exceed the maximum limit (10), for your application.
bring close
Thx Wil Smith but how to resolve it?
wil smith
See, when ever number of HTTP sessions exceed the allowed limit, it throws an exception E_MAX_EXCEEDED. So check the result code returned by Construct() method and proceed only if Construct() returns E_SUCCESS.