Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created wcf OpenDataServices with mysql DB. I am getting data from tables in a quick flash. But when I tried to get data from a view, It is throwing timeout exception. When tried directly in db data is getting very quickly.

I tried by setting the following in web.config.
C#
<system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="NetHttpBinding" maxBufferPoolSize="2147483647"  closeTimeout="00:01:00"
                 openTimeout="00:01:00"  maxConnections="10"
                 receiveTimeout="00:10:00"
                 sendTimeout="00:10:00"
          maxBufferSize="524288" maxReceivedMessageSize="2147483647" />
      </netTcpBinding>
    </bindings>
    <services>
      <service name="MyService">
        <endpoint address="http://localhost:59825" binding="netTcpBinding"
          bindingConfiguration="NetHttpBinding" name="HttpBinding" />
      </service>
    </services>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
  </system.serviceModel>


still timeout exception.

Edit1:

When I tried with a table, data is getting. I created a view for that table as select * from same table and tried with that view its throwing timeout exception.This issue is not there when using views of tables with less data.

Please help.

Thanks,
Jaison.
Posted
Updated 30-Jan-17 8:04am
v3
Comments
CodeChecker 5689 8-Aug-13 8:00am    
Try to optimize query for getting data, i think it is due to heavy database.

1 solution

I never used MySQL before, but maybe the user executing the command does not have the same permission to see the data using this view, if there is a profiler or something similar, check the for a different error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900